Decompiled source of JojoCards v1.0.0
JojoCards.dll
Decompiled 15 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using ModdingUtils.Utils; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("0.0.0.0")] namespace JojoCards; public class TwentiethCenturyBoy : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) cardInfo.allowMultiple = false; cardInfo.colorTheme = (CardThemeColorType)4; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<TwentiethCenturyBoyEffect>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { TwentiethCenturyBoyEffect component = ((Component)player).gameObject.GetComponent<TwentiethCenturyBoyEffect>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "20th Century BOY"; } protected override string GetDescription() { return "Stand still to become completely invincible. Moving breaks the protection."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Standing Still", amount = "Invincible", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "While Moving", amount = "No Protection", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } } public class TwentiethCenturyBoyEffect : MonoBehaviour { private Player myPlayer; private Rigidbody2D myRb; private bool isInvincible; private float savedHealth; private float stillTimer; private float activateDelay = 0.3f; private float savedAttackSpeed; private float savedBlockCd; private bool savedStats; private GameObject shieldVisual; private SpriteRenderer shieldSr; private SpriteRenderer innerSr; private void Start() { myPlayer = ((Component)this).GetComponent<Player>(); myRb = ((Component)myPlayer).GetComponent<Rigidbody2D>(); if ((Object)(object)myRb == (Object)null) { myRb = ((Component)myPlayer).GetComponentInChildren<Rigidbody2D>(); } CreateShieldVisual(); } private void CreateShieldVisual() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0036: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) shieldVisual = new GameObject("20CBShield"); shieldVisual.transform.SetParent(((Component)myPlayer).transform); shieldVisual.transform.localPosition = Vector3.zero; shieldVisual.transform.localScale = Vector3.one * 2f; shieldSr = shieldVisual.AddComponent<SpriteRenderer>(); shieldSr.sprite = CreateRingSprite(); shieldSr.color = new Color(0.9f, 0.2f, 0.6f, 0f); ((Renderer)shieldSr).sortingOrder = 100; GameObject val = new GameObject("InnerShield"); val.transform.SetParent(shieldVisual.transform); val.transform.localPosition = Vector3.zero; val.transform.localScale = Vector3.one * 0.85f; innerSr = val.AddComponent<SpriteRenderer>(); innerSr.sprite = CreateCircleSprite(); innerSr.color = new Color(0.9f, 0.2f, 0.6f, 0f); ((Renderer)innerSr).sortingOrder = 99; } private bool IsThisPlayerMoving() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)myPlayer == (Object)null) { return false; } Vector2 val = Vector2.op_Implicit(myPlayer.data.input.direction); if (((Vector2)(ref val)).magnitude > 0.15f) { return true; } return false; } private void DisableActions() { if (!savedStats) { Gun gun = myPlayer.data.weaponHandler.gun; savedAttackSpeed = (((Object)(object)gun != (Object)null) ? gun.attackSpeed : 1f); savedBlockCd = myPlayer.data.block.cooldown; savedStats = true; if ((Object)(object)gun != (Object)null) { gun.attackSpeed = float.MaxValue; } myPlayer.data.block.cooldown = float.MaxValue; } } private void RestoreActions() { if (savedStats) { Gun gun = myPlayer.data.weaponHandler.gun; if ((Object)(object)gun != (Object)null) { gun.attackSpeed = savedAttackSpeed; } myPlayer.data.block.cooldown = savedBlockCd; savedStats = false; } } private void Update() { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)myPlayer == (Object)null || myPlayer.data.dead) { if (savedStats) { RestoreActions(); } isInvincible = false; return; } if (IsThisPlayerMoving()) { stillTimer = 0f; if (isInvincible) { isInvincible = false; RestoreActions(); } } else { stillTimer += Time.deltaTime; if (!isInvincible && stillTimer >= activateDelay) { isInvincible = true; savedHealth = myPlayer.data.health; DisableActions(); } } if (isInvincible) { savedHealth = Mathf.Max(savedHealth, myPlayer.data.health); if ((Object)(object)myRb != (Object)null) { myRb.velocity = Vector2.zero; myRb.angularVelocity = 0f; } } UpdateVisual(); } private void LateUpdate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (isInvincible && !((Object)(object)myPlayer == (Object)null) && !myPlayer.data.dead) { if ((Object)(object)myRb != (Object)null) { myRb.velocity = Vector2.zero; myRb.angularVelocity = 0f; } if (myPlayer.data.health < savedHealth) { float num = savedHealth - myPlayer.data.health; myPlayer.data.healthHandler.Heal(num); SpawnBlockSpark(); } } } private void FixedUpdate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (isInvincible && !((Object)(object)myPlayer == (Object)null) && !myPlayer.data.dead && (Object)(object)myRb != (Object)null) { myRb.velocity = Vector2.zero; myRb.angularVelocity = 0f; } } private void SpawnBlockSpark() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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) GameObject val = new GameObject("InvincibleSpark"); val.transform.position = ((Component)myPlayer).transform.position + Vector2.op_Implicit(Random.insideUnitCircle * 0.5f); val.transform.localScale = Vector3.one * 0.2f; SpriteRenderer obj = val.AddComponent<SpriteRenderer>(); obj.sprite = CreateCircleSprite(); obj.color = new Color(1f, 0.3f, 0.7f, 1f); ((Renderer)obj).sortingOrder = 150; val.AddComponent<InvincibleSpark>(); } private void UpdateVisual() { //IL_0050: 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_0093: 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_0186: 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_0109: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)shieldSr == (Object)null) && !((Object)(object)innerSr == (Object)null)) { if (isInvincible) { float num = 2f + Mathf.Sin(Time.time * 3f) * 0.2f; shieldVisual.transform.localScale = Vector3.one * num; float num2 = 0.4f + Mathf.Sin(Time.time * 4f) * 0.1f; shieldSr.color = new Color(0.9f, 0.2f, 0.6f, num2); float num3 = 0.08f + Mathf.Sin(Time.time * 5f) * 0.03f; innerSr.color = new Color(0.9f, 0.2f, 0.6f, num3); } else if (stillTimer > 0f) { float num4 = Mathf.Clamp01(stillTimer / activateDelay); shieldVisual.transform.localScale = Vector3.one * (1f + num4); shieldSr.color = new Color(0.9f, 0.2f, 0.6f, num4 * 0.2f); innerSr.color = new Color(0.9f, 0.2f, 0.6f, num4 * 0.05f); } else { shieldSr.color = new Color(0.9f, 0.2f, 0.6f, 0f); innerSr.color = new Color(0.9f, 0.2f, 0.6f, 0f); } } } private void OnDestroy() { if (savedStats) { RestoreActions(); } if ((Object)(object)shieldVisual != (Object)null) { Object.Destroy((Object)(object)shieldVisual); } } private Sprite CreateCircleSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) int num = 32; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); val.SetPixel(j, i, (Color)((num4 <= num3) ? new Color(1f, 1f, 1f, 1f - num4 / num3) : Color.clear)); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } private Sprite CreateRingSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0095: 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_0036: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) int num = 32; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; float num4 = num3 - 3f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num5 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); val.SetPixel(j, i, (num5 <= num3 && num5 >= num4) ? Color.white : Color.clear); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } } public class InvincibleSpark : MonoBehaviour { private float timer; 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_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_0054: 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_0097: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / 0.3f; Transform transform = ((Component)this).transform; transform.position += Vector3.up * 2f * Time.deltaTime; ((Component)this).transform.localScale = Vector3.one * (0.2f * (1f - num)); SpriteRenderer component = ((Component)this).GetComponent<SpriteRenderer>(); if ((Object)(object)component != (Object)null) { component.color = new Color(1f, 0.3f, 0.7f, 1f - num); } if (timer >= 0.3f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class BeetleArrow : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) cardInfo.allowMultiple = false; cardInfo.colorTheme = (CardThemeColorType)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<BeetleArrowEffect>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BeetleArrowEffect component = ((Component)player).gameObject.GetComponent<BeetleArrowEffect>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Beetle Arrow"; } protected override string GetDescription() { return "A special arrow with a beetle carved into it. Combine with Gold Experience for Requiem!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Gold Experience Combo", amount = "Requiem", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } } public class BeetleArrowEffect : MonoBehaviour { } public class BombBehavior : MonoBehaviour { public Player owner; public float damage = 55f; public float lifetime = 8f; public float explosionRadius = 10f; public float knockbackForce = 15000f; private float timer; private bool exploded; private Transform glowTransform; private Transform outerGlowTransform; private SpriteRenderer glowSprite; private SpriteRenderer outerGlowSprite; private void Start() { Transform val = ((Component)this).transform.Find("Glow"); Transform val2 = ((Component)this).transform.Find("OuterGlow"); if ((Object)(object)val != (Object)null) { glowTransform = val; glowSprite = ((Component)val).GetComponent<SpriteRenderer>(); } if ((Object)(object)val2 != (Object)null) { outerGlowTransform = val2; outerGlowSprite = ((Component)val2).GetComponent<SpriteRenderer>(); } } private void Update() { //IL_0036: 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_0078: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = 1.2f + Mathf.Sin(timer * 4f) * 0.15f; ((Component)this).transform.localScale = Vector3.one * num; if ((Object)(object)glowTransform != (Object)null) { float num2 = 2f + Mathf.Sin(timer * 3f) * 0.5f; glowTransform.localScale = Vector3.one * num2; } if ((Object)(object)glowSprite != (Object)null) { float num3 = 0.3f + Mathf.Sin(timer * 5f) * 0.15f; glowSprite.color = new Color(1f, 0.2f, 0f, num3); } if ((Object)(object)outerGlowTransform != (Object)null) { float num4 = 3f + Mathf.Sin(timer * 2f) * 0.8f; outerGlowTransform.localScale = Vector3.one * num4; } if ((Object)(object)outerGlowSprite != (Object)null) { float num5 = 0.15f + Mathf.Sin(timer * 3.5f) * 0.1f; outerGlowSprite.color = new Color(1f, 0f, 0f, num5); } if (timer >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void OnTriggerEnter2D(Collider2D other) { if (!exploded) { Player component = ((Component)other).GetComponent<Player>(); if ((Object)(object)component == (Object)null) { component = ((Component)((Component)other).transform.root).GetComponent<Player>(); } if (!((Object)(object)component == (Object)null) && !((Object)(object)component == (Object)(object)owner)) { Explode(); } } } private void Explode() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) exploded = true; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)(object)owner)) { float num = Vector2.Distance(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(((Component)this).transform.position)); if (!(num > explosionRadius)) { float num2 = 1f - num / explosionRadius; Vector3 val = ((Component)player).transform.position - ((Component)this).transform.position; Vector2 val2 = Vector2.op_Implicit(((Vector3)(ref val)).normalized); Vector2 val3 = Vector2.up * knockbackForce * num2 * 0.5f; Vector2 val4 = val2 * knockbackForce * num2 + val3; ((Damagable)player.data.healthHandler).CallTakeDamage(damage * num2 * Vector2.up, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true, (DamageSource)0); player.data.healthHandler.CallTakeForce(val4, (ForceMode2D)1, false, true, 0f); } } } SpawnExplosionVisual(); Object.Destroy((Object)(object)((Component)this).gameObject); } private void SpawnExplosionVisual() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("EchoesExplosion"); val.transform.position = ((Component)this).transform.position; val.AddComponent<ExplosionVisual>(); } } public class ExplosionVisual : MonoBehaviour { private float timer; private float duration = 0.5f; private List<SpriteRenderer> rings = new List<SpriteRenderer>(); private void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 5; i++) { GameObject val = new GameObject("Ring" + i); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; SpriteRenderer val2 = val.AddComponent<SpriteRenderer>(); val2.sprite = CreateRingSprite(); ((Renderer)val2).sortingOrder = 100 + i; switch (i) { case 0: val2.color = new Color(1f, 1f, 1f, 1f); break; case 1: val2.color = new Color(1f, 0f, 0f, 0.9f); break; case 2: val2.color = new Color(1f, 0.3f, 0f, 0.7f); break; case 3: val2.color = new Color(1f, 0.5f, 0f, 0.5f); break; default: val2.color = new Color(1f, 0.7f, 0f, 0.3f); break; } val.transform.localScale = Vector3.zero; rings.Add(val2); } } private void Update() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; for (int i = 0; i < rings.Count; i++) { float num = (float)i * 0.04f; float num2 = Mathf.Clamp01((timer - num) / (duration - num)); float num3 = Mathf.Lerp(0f, 6f, num2); ((Component)rings[i]).transform.localScale = Vector3.one * num3; Color color = rings[i].color; color.a = Mathf.Lerp(1f, 0f, num2); rings[i].color = color; } if (timer >= duration + 0.1f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private Sprite CreateRingSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_0036: 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_006a: 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) int num = 64; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; float num4 = num3 - 4f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num5 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); if (num5 <= num3 && num5 >= num4) { val.SetPixel(j, i, Color.white); } else { val.SetPixel(j, i, Color.clear); } } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } } public class BombOnHit : MonoBehaviour { public EchoesEffect echoesEffect; private bool hasSpawned; private void OnDestroy() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (!hasSpawned && (Object)(object)echoesEffect != (Object)null) { hasSpawned = true; echoesEffect.SpawnBomb(((Component)this).transform.position); } } } public static class CardArtManager { private static GameObject _hamonArt; private static GameObject _stoneMaskArt; private static Sprite _treeSprite; private static Sprite _novemberRainSprite; private static Sprite _funFunFunSprite; private static Sprite _funFunFunMark; public static GameObject HamonArt { get { if ((Object)(object)_hamonArt != (Object)null) { return _hamonArt; } _hamonArt = CreateCardArt("hamon_art"); return _hamonArt; } } public static GameObject StoneMaskArt { get { if ((Object)(object)_stoneMaskArt != (Object)null) { return _stoneMaskArt; } _stoneMaskArt = CreateCardArt("stonemask_art"); return _stoneMaskArt; } } public static Sprite TreeSprite { get { if ((Object)(object)_treeSprite != (Object)null) { return _treeSprite; } _treeSprite = LoadSprite("Tree_sprite"); return _treeSprite; } } public static Sprite NovemberRainSprite { get { if ((Object)(object)_novemberRainSprite != (Object)null) { return _novemberRainSprite; } _novemberRainSprite = LoadSprite("NovemberRainSprite"); return _novemberRainSprite; } } public static Sprite FunFunFunSprite { get { if ((Object)(object)_funFunFunSprite != (Object)null) { return _funFunFunSprite; } _funFunFunSprite = LoadSprite("FunFunFunSprite"); return _funFunFunSprite; } } public static Sprite FunFunFunMark { get { if ((Object)(object)_funFunFunMark != (Object)null) { return _funFunFunMark; } _funFunFunMark = LoadSprite("FunFunFunMark"); return _funFunFunMark; } } private static GameObject CreateCardArt(string resourceName) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0061: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(512, 512); ImageConversion.LoadImage(val, array); Sprite sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f); GameObject val2 = new GameObject(resourceName + "_art"); Object.DontDestroyOnLoad((Object)val2); val2.SetActive(false); val2.AddComponent<SpriteRenderer>().sprite = sprite; return val2; } private static Sprite LoadSprite(string resourceName) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(512, 512); ImageConversion.LoadImage(val, array); return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f); } } public class ClackerBoomerang : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) cardInfo.allowMultiple = false; cardInfo.colorTheme = (CardThemeColorType)0; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { block.cdAdd = 2f; ((Component)player).gameObject.AddComponent<ClackerBoomerangEffect>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ClackerBoomerangEffect component = ((Component)player).gameObject.GetComponent<ClackerBoomerangEffect>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Clacker Boomerang"; } protected override string GetDescription() { return "Block to throw Hamon clackers! Extra deadly to vampires."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Block", amount = "Throws Clackers", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Clacker Damage", amount = "40", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "vs Stone Mask", amount = "100 DMG", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Cooldown", amount = "5 Seconds", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } } public class ClackerBoomerangEffect : MonoBehaviour { private Player player; private Block block; private float cooldown = 5f; private float cooldownTimer; private bool canThrow = true; private void Start() { player = ((Component)this).GetComponent<Player>(); block = player.data.block; Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void Update() { if (!canThrow) { cooldownTimer += Time.deltaTime; if (cooldownTimer >= cooldown) { canThrow = true; cooldownTimer = 0f; } } } private void OnBlock(BlockTriggerType triggerType) { if (canThrow) { Player val = FindNearestEnemy(); if (!((Object)(object)val == (Object)null)) { canThrow = false; cooldownTimer = 0f; SpawnClacker(val); } } } private Player FindNearestEnemy() { //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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)(object)this.player) && !player.data.dead) { float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(((Component)this.player).transform.position)); if (num2 < num) { num = num2; result = player; } } } return result; } private void SpawnClacker(Player target) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Clacker"); val.transform.position = ((Component)player).transform.position; ClackerProjectile clackerProjectile = val.AddComponent<ClackerProjectile>(); clackerProjectile.owner = player; clackerProjectile.damage = 40f; clackerProjectile.vampireBonusDamage = 60f; Vector3 val2 = ((Component)target).transform.position - ((Component)player).transform.position; clackerProjectile.direction = Vector2.op_Implicit(((Vector3)(ref val2)).normalized); } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); } } } public class ClackerProjectile : MonoBehaviour { public Player owner; public float damage = 40f; public float vampireBonusDamage = 60f; public Vector2 direction; private float speed = 25f; private float timer; private float flyTime = 1f; private float lifetime = 5f; private bool returning; private bool hasHitOutgoing; private bool hasHitReturn; private float spinAngle; private Vector2 returnDirection; private SpriteRenderer ball1; private SpriteRenderer ball2; private SpriteRenderer ball3; private LineRenderer string1; private LineRenderer string2; private void Start() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Ball1"); val.transform.SetParent(((Component)this).transform); ball1 = val.AddComponent<SpriteRenderer>(); ball1.sprite = CreateCircleSprite(); ball1.color = new Color(0.7f, 0.7f, 0.7f, 1f); ((Renderer)ball1).sortingOrder = 201; val.transform.localScale = Vector3.one * 0.6f; GameObject val2 = new GameObject("Ball2"); val2.transform.SetParent(((Component)this).transform); ball2 = val2.AddComponent<SpriteRenderer>(); ball2.sprite = CreateCircleSprite(); ball2.color = new Color(0.7f, 0.7f, 0.7f, 1f); ((Renderer)ball2).sortingOrder = 201; val2.transform.localScale = Vector3.one * 0.6f; GameObject val3 = new GameObject("Ball3"); val3.transform.SetParent(((Component)this).transform); ball3 = val3.AddComponent<SpriteRenderer>(); ball3.sprite = CreateCircleSprite(); ball3.color = new Color(0.9f, 0.2f, 0.1f, 0.9f); ((Renderer)ball3).sortingOrder = 200; val3.transform.localScale = Vector3.one * 0.35f; GameObject val4 = new GameObject("String1"); val4.transform.SetParent(((Component)this).transform); string1 = val4.AddComponent<LineRenderer>(); ((Renderer)string1).material = new Material(Shader.Find("Sprites/Default")); string1.startWidth = 0.05f; string1.endWidth = 0.05f; string1.positionCount = 2; string1.useWorldSpace = true; string1.startColor = new Color(0.9f, 0.8f, 0.3f, 0.8f); string1.endColor = new Color(0.9f, 0.8f, 0.3f, 0.8f); ((Renderer)string1).sortingOrder = 199; GameObject val5 = new GameObject("String2"); val5.transform.SetParent(((Component)this).transform); string2 = val5.AddComponent<LineRenderer>(); ((Renderer)string2).material = new Material(Shader.Find("Sprites/Default")); string2.startWidth = 0.05f; string2.endWidth = 0.05f; string2.positionCount = 2; string2.useWorldSpace = true; string2.startColor = new Color(0.9f, 0.8f, 0.3f, 0.8f); string2.endColor = new Color(0.9f, 0.8f, 0.3f, 0.8f); ((Renderer)string2).sortingOrder = 199; } private void Update() { //IL_0065: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_040f: 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_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_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0300: 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_0313: 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_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; spinAngle += 600f * Time.deltaTime; float num = spinAngle * ((float)Math.PI / 180f); float num2 = num + (float)Math.PI; float num3 = 0.5f; ((Component)ball1).transform.localPosition = new Vector3(Mathf.Cos(num) * num3, Mathf.Sin(num) * num3, 0f); ((Component)ball2).transform.localPosition = new Vector3(Mathf.Cos(num2) * num3, Mathf.Sin(num2) * num3, 0f); ((Component)ball3).transform.localPosition = Vector3.zero; string1.SetPosition(0, ((Component)ball1).transform.position); string1.SetPosition(1, ((Component)ball3).transform.position); string2.SetPosition(0, ((Component)ball2).transform.position); string2.SetPosition(1, ((Component)ball3).transform.position); if (returning) { Vector2 val; if ((Object)(object)owner != (Object)null) { val = Vector2.op_Implicit(((Component)owner).transform.position - ((Component)this).transform.position); returnDirection = ((Vector2)(ref val)).normalized; if (Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)owner).transform.position)) < 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } } Transform transform = ((Component)this).transform; transform.position += Vector2.op_Implicit(returnDirection * speed * Time.deltaTime); if (!hasHitReturn) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player == (Object)(object)owner || player.data.dead || !(Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position)) < 1.2f)) { continue; } hasHitReturn = true; int num4; float num5; if ((Object)(object)((Component)player).GetComponent<StoneMaskEffect>() != (Object)null) { num4 = (((Object)(object)((Component)player).GetComponent<UltimateLifeFormEffect>() == (Object)null) ? 1 : 0); if (num4 != 0) { num5 = damage + vampireBonusDamage; goto IL_0298; } } else { num4 = 0; } num5 = damage; goto IL_0298; IL_0298: float num6 = num5; ((Damagable)player.data.healthHandler).CallTakeDamage(num6 * Vector2.up, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true, (DamageSource)0); float num7 = ((num4 != 0) ? 5000f : 3000f); val = Vector2.op_Implicit(((Component)player).transform.position - ((Component)this).transform.position); Vector2 normalized = ((Vector2)(ref val)).normalized; player.data.healthHandler.CallTakeForce(normalized * num7, (ForceMode2D)1, false, true, 0f); if (num4 != 0) { SpawnHamonBurstVisual(((Component)player).transform.position); } else { SpawnHitVisual(((Component)player).transform.position); } } } } else { Transform transform2 = ((Component)this).transform; transform2.position += Vector2.op_Implicit(direction * speed * Time.deltaTime); if (!hasHitOutgoing) { foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 == (Object)(object)owner || player2.data.dead || !(Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player2).transform.position)) < 1.2f)) { continue; } hasHitOutgoing = true; int num8; float num9; if ((Object)(object)((Component)player2).GetComponent<StoneMaskEffect>() != (Object)null) { num8 = (((Object)(object)((Component)player2).GetComponent<UltimateLifeFormEffect>() == (Object)null) ? 1 : 0); if (num8 != 0) { num9 = damage + vampireBonusDamage; goto IL_0461; } } else { num8 = 0; } num9 = damage; goto IL_0461; IL_0461: float num10 = num9; ((Damagable)player2.data.healthHandler).CallTakeDamage(num10 * Vector2.up, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true, (DamageSource)0); float num11 = ((num8 != 0) ? 5000f : 3000f); player2.data.healthHandler.CallTakeForce(direction * num11, (ForceMode2D)1, false, true, 0f); if (num8 != 0) { SpawnHamonBurstVisual(((Component)player2).transform.position); } else { SpawnHitVisual(((Component)player2).transform.position); } StartReturn(); return; } } if (timer >= flyTime) { StartReturn(); return; } } if (timer >= lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void StartReturn() { //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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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) returning = true; if ((Object)(object)owner != (Object)null) { Vector2 val = Vector2.op_Implicit(((Component)owner).transform.position - ((Component)this).transform.position); returnDirection = ((Vector2)(ref val)).normalized; } else { returnDirection = -direction; } } private void SpawnHitVisual(Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("ClackerHit"); val.transform.position = position; val.AddComponent<ClackerHitVisual>(); } private void SpawnHamonBurstVisual(Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("HamonBurst"); val.transform.position = position; val.AddComponent<ClackerHamonBurstVisual>(); } private Sprite CreateCircleSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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) int num = 32; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); val.SetPixel(j, i, (num4 <= num3) ? Color.white : Color.clear); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } } public class ClackerHitVisual : MonoBehaviour { private float timer; private float duration = 0.3f; private List<SpriteRenderer> sparks = new List<SpriteRenderer>(); private void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 6; i++) { GameObject val = new GameObject("Spark" + i); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; val.transform.localScale = Vector3.one * 0.2f; SpriteRenderer val2 = val.AddComponent<SpriteRenderer>(); val2.sprite = CreateCircleSprite(); ((Renderer)val2).sortingOrder = 150; val2.color = new Color(1f, 0.8f, 0.2f, 1f); sparks.Add(val2); } } private void Update() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / duration; for (int i = 0; i < sparks.Count; i++) { float num2 = (float)i * (float)Math.PI * 2f / (float)sparks.Count; float num3 = num * 2f; ((Component)sparks[i]).transform.localPosition = new Vector3(Mathf.Cos(num2) * num3, Mathf.Sin(num2) * num3, 0f); sparks[i].color = new Color(1f, 0.8f, 0.2f, 1f - num); ((Component)sparks[i]).transform.localScale = Vector3.one * (0.2f * (1f - num)); } if (timer >= duration) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private Sprite CreateCircleSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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) int num = 16; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); val.SetPixel(j, i, (num4 <= num3) ? Color.white : Color.clear); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } } public class ClackerHamonBurstVisual : MonoBehaviour { private float timer; private float duration = 0.5f; private List<SpriteRenderer> rings = new List<SpriteRenderer>(); private void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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) for (int i = 0; i < 3; i++) { GameObject val = new GameObject("HamonRing" + i); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; SpriteRenderer val2 = val.AddComponent<SpriteRenderer>(); val2.sprite = CreateRingSprite(); ((Renderer)val2).sortingOrder = 150 + i; switch (i) { case 0: val2.color = new Color(1f, 1f, 0.5f, 1f); break; case 1: val2.color = new Color(1f, 0.85f, 0f, 0.8f); break; default: val2.color = new Color(1f, 0.7f, 0f, 0.6f); break; } val.transform.localScale = Vector3.zero; rings.Add(val2); } } private void Update() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; for (int i = 0; i < rings.Count; i++) { float num = (float)i * 0.06f; float num2 = Mathf.Clamp01((timer - num) / (duration - num)); float num3 = Mathf.Lerp(0f, 5f, num2); ((Component)rings[i]).transform.localScale = Vector3.one * num3; Color color = rings[i].color; color.a = Mathf.Lerp(1f, 0f, num2); rings[i].color = color; } if (timer >= duration + 0.1f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private Sprite CreateRingSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_0036: 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_006a: 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) int num = 64; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; float num4 = num3 - 4f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num5 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); if (num5 <= num3 && num5 >= num4) { val.SetPixel(j, i, Color.white); } else { val.SetPixel(j, i, Color.clear); } } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } } public class EchoesACT3 : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) cardInfo.allowMultiple = false; cardInfo.colorTheme = (CardThemeColorType)5; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent<EchoesACT3Effect>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { EchoesACT3Effect component = ((Component)player).gameObject.GetComponent<EchoesACT3Effect>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Echoes ACT3"; } protected override string GetDescription() { return "THREE FREEZE! Enemies in your aura are slowed and pushed to the ground."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Gravity Aura", amount = "Radius", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Enemy Speed", amount = "-50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Pushdown", amount = "Heavy", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)5; } } public class EchoesACT3Effect : MonoBehaviour { private Player player; private float auraRadius = 8f; private float pushDownForce = 30000f; private float slowMultiplier = 0.2f; private GameObject auraVisual; private SpriteRenderer auraSprite; private SpriteRenderer innerAuraSprite; private Dictionary<Player, float> originalSpeeds = new Dictionary<Player, float>(); private Dictionary<Player, GravityLinesVisual> activeVisuals = new Dictionary<Player, GravityLinesVisual>(); private HashSet<Player> affectedPlayers = new HashSet<Player>(); private void Start() { player = ((Component)this).GetComponent<Player>(); CreateAuraVisual(); } private void CreateAuraVisual() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0036: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_013d: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) auraVisual = new GameObject("EchoesAura"); auraVisual.transform.SetParent(((Component)player).transform); auraVisual.transform.localPosition = Vector3.zero; auraSprite = auraVisual.AddComponent<SpriteRenderer>(); auraSprite.sprite = CreateCircleSprite(); auraSprite.color = new Color(0f, 1f, 0.3f, 0.015f); ((Renderer)auraSprite).sortingOrder = -1; auraVisual.transform.localScale = Vector3.one * auraRadius * 2f; GameObject val = new GameObject("AuraRing"); val.transform.SetParent(auraVisual.transform); val.transform.localPosition = Vector3.zero; val.transform.localScale = Vector3.one; SpriteRenderer obj = val.AddComponent<SpriteRenderer>(); obj.sprite = CreateRingSprite(); obj.color = new Color(0f, 1f, 0.3f, 0.06f); ((Renderer)obj).sortingOrder = -1; GameObject val2 = new GameObject("InnerGlow"); val2.transform.SetParent(auraVisual.transform); val2.transform.localPosition = Vector3.zero; val2.transform.localScale = Vector3.one * 0.5f; innerAuraSprite = val2.AddComponent<SpriteRenderer>(); innerAuraSprite.sprite = CreateCircleSprite(); innerAuraSprite.color = new Color(0f, 1f, 0.3f, 0.025f); ((Renderer)innerAuraSprite).sortingOrder = -1; } private void Update() { //IL_0096: 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_00ab: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || player.data.dead) { RestoreAllSpeeds(); RemoveAllVisuals(); if ((Object)(object)auraVisual != (Object)null) { auraVisual.SetActive(false); } return; } if ((Object)(object)auraVisual != (Object)null && !auraVisual.activeSelf) { auraVisual.SetActive(true); } float num = 1f + Mathf.Sin(Time.time * 2f) * 0.05f; auraVisual.transform.localScale = Vector3.one * auraRadius * 2f * num; if ((Object)(object)auraSprite != (Object)null) { float num2 = 0.015f + Mathf.Sin(Time.time * 3f) * 0.005f; auraSprite.color = new Color(0f, 1f, 0.3f, num2); } if ((Object)(object)innerAuraSprite != (Object)null) { float num3 = 0.5f + Mathf.Sin(Time.time * 4f) * 0.1f; ((Component)innerAuraSprite).transform.localScale = Vector3.one * num3; } HashSet<Player> hashSet = new HashSet<Player>(); foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player == (Object)(object)this.player || player.data.dead) { continue; } float num4 = Vector2.Distance(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(((Component)this.player).transform.position)); if (!(num4 <= auraRadius)) { continue; } hashSet.Add(player); if (!affectedPlayers.Contains(player)) { if (!originalSpeeds.ContainsKey(player)) { originalSpeeds[player] = player.data.stats.movementSpeed; } CharacterStatModifiers stats = player.data.stats; stats.movementSpeed *= slowMultiplier; affectedPlayers.Add(player); AddGravityVisual(player); } float num5 = 1f - num4 / auraRadius; Vector2 val = Vector2.down * pushDownForce * num5 * Time.deltaTime; Rigidbody2D val2 = ((Component)player).GetComponent<Rigidbody2D>(); if ((Object)(object)val2 == (Object)null) { val2 = ((Component)player).GetComponentInChildren<Rigidbody2D>(); } if ((Object)(object)val2 != (Object)null) { val2.AddForce(val); val2.velocity = new Vector2(val2.velocity.x, Mathf.Min(val2.velocity.y, -5f)); } } List<Player> list = new List<Player>(); foreach (Player affectedPlayer in affectedPlayers) { if (!hashSet.Contains(affectedPlayer)) { list.Add(affectedPlayer); } } foreach (Player item in list) { RestoreSpeed(item); RemoveGravityVisual(item); affectedPlayers.Remove(item); } } private void AddGravityVisual(Player target) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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) if (!activeVisuals.ContainsKey(target)) { GameObject val = new GameObject("GravityLines"); val.transform.SetParent(((Component)target).transform); val.transform.localPosition = Vector3.zero; GravityLinesVisual value = val.AddComponent<GravityLinesVisual>(); activeVisuals[target] = value; } } private void RemoveGravityVisual(Player target) { if (activeVisuals.ContainsKey(target)) { GravityLinesVisual gravityLinesVisual = activeVisuals[target]; if ((Object)(object)gravityLinesVisual != (Object)null && (Object)(object)((Component)gravityLinesVisual).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)gravityLinesVisual).gameObject); } activeVisuals.Remove(target); } } private void RemoveAllVisuals() { foreach (KeyValuePair<Player, GravityLinesVisual> activeVisual in activeVisuals) { if ((Object)(object)activeVisual.Value != (Object)null && (Object)(object)((Component)activeVisual.Value).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)activeVisual.Value).gameObject); } } activeVisuals.Clear(); } private void RestoreSpeed(Player target) { if (!((Object)(object)target == (Object)null) && originalSpeeds.ContainsKey(target)) { target.data.stats.movementSpeed = originalSpeeds[target]; originalSpeeds.Remove(target); } } private void RestoreAllSpeeds() { foreach (Player affectedPlayer in affectedPlayers) { RestoreSpeed(affectedPlayer); } affectedPlayers.Clear(); } private void OnDestroy() { RestoreAllSpeeds(); RemoveAllVisuals(); if ((Object)(object)auraVisual != (Object)null) { Object.Destroy((Object)(object)auraVisual); } } private Sprite CreateCircleSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) int num = 64; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); if (num4 <= num3) { float num5 = 1f - num4 / num3; val.SetPixel(j, i, new Color(1f, 1f, 1f, num5)); } else { val.SetPixel(j, i, Color.clear); } } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } private Sprite CreateRingSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_0036: 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_006a: 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) int num = 64; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; float num4 = num3 - 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num5 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); if (num5 <= num3 && num5 >= num4) { val.SetPixel(j, i, Color.white); } else { val.SetPixel(j, i, Color.clear); } } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } } public class GravityLinesVisual : MonoBehaviour { private List<LineRenderer> lines = new List<LineRenderer>(); private int lineCount = 6; private float lineSpeed = 3f; private float lineLength = 1.2f; private float[] lineOffsets; private void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown lineOffsets = new float[lineCount]; for (int i = 0; i < lineCount; i++) { GameObject val = new GameObject("GravLine" + i); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; LineRenderer val2 = val.AddComponent<LineRenderer>(); ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); ((Renderer)val2).sortingOrder = 200; val2.positionCount = 2; val2.startWidth = 0.06f; val2.endWidth = 0.02f; val2.useWorldSpace = true; lines.Add(val2); lineOffsets[i] = Random.Range(0f, lineLength * 2f); } } private void Update() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) if (lines.Count == 0) { return; } float num = 1.5f; float num2 = 0.6f; for (int i = 0; i < lines.Count; i++) { lineOffsets[i] += lineSpeed * Time.deltaTime; if (lineOffsets[i] > lineLength * 2f) { lineOffsets[i] = 0f; } bool num3 = i < lineCount / 2; int num4 = (num3 ? i : (i - lineCount / 2)); float num5 = (num3 ? (0f - num2) : num2); num5 += ((float)num4 - (float)lineCount / 4f) * 0.15f; float num6 = num - lineOffsets[i]; float num7 = num6 - lineLength; Vector3 position = ((Component)this).transform.position; Vector3 val = position + new Vector3(num5, num6, 0f); Vector3 val2 = position + new Vector3(num5, num7, 0f); lines[i].SetPosition(0, val); lines[i].SetPosition(1, val2); bool num8 = i % 2 == 0; float num9 = 1f - lineOffsets[i] / (lineLength * 2f); num9 = Mathf.Clamp01(num9) * 0.7f; if (num8) { lines[i].startColor = new Color(0f, 1f, 0.3f, num9); lines[i].endColor = new Color(0f, 1f, 0.3f, num9 * 0.3f); } else { lines[i].startColor = new Color(0f, 0f, 0f, num9); lines[i].endColor = new Color(0f, 0f, 0f, num9 * 0.3f); } } } private void OnDestroy() { foreach (LineRenderer line in lines) { if ((Object)(object)line != (Object)null && (Object)(object)((Component)line).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)line).gameObject); } } lines.Clear(); } } public class EchoesACT1 : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) cardInfo.allowMultiple = false; cardInfo.colorTheme = (CardThemeColorType)4; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { gun.ammo = 3; block.cdAdd = 0.5f; ((Component)player).gameObject.AddComponent<EchoesEffect>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { EchoesEffect component = ((Component)player).gameObject.GetComponent<EchoesEffect>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Echoes ACT1"; } protected override string GetDescription() { return "Bullets place sound bombs. Step on them and BOOM! Block to reload."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Sound Bombs", amount = "3 Max", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block", amount = "Reloads Ammo", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Explosion", amount = "Knockback + Stun", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+0.5s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } } public class EchoesEffect : MonoBehaviour { private Player player; private Gun gun; private Block block; private List<GameObject> activeBombs = new List<GameObject>(); public const int MAX_BOMBS = 3; public const float BOMB_LIFETIME = 8f; public const float BOMB_DAMAGE = 55f; private void Start() { player = ((Component)this).GetComponent<Player>(); gun = player.data.weaponHandler.gun; block = player.data.block; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); Block obj2 = block; obj2.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj2.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType triggerType) { GunAmmo componentInChildren = ((Component)gun).GetComponentInChildren<GunAmmo>(); if ((Object)(object)componentInChildren != (Object)null) { ExtensionMethods.InvokeMethod((object)componentInChildren, "ReloadAmmo", Array.Empty<object>()); } } private void OnShoot(GameObject projectile) { projectile.AddComponent<BombOnHit>().echoesEffect = this; } public void SpawnBomb(Vector3 position) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) activeBombs.RemoveAll((GameObject b) => (Object)(object)b == (Object)null); if (activeBombs.Count >= 3) { Object.Destroy((Object)(object)activeBombs[0]); activeBombs.RemoveAt(0); } GameObject val = new GameObject("EchoesBomb"); val.transform.position = position; val.transform.localScale = Vector3.one * 1.2f; SpriteRenderer obj = val.AddComponent<SpriteRenderer>(); obj.sprite = CreateCircleSprite(); obj.color = new Color(1f, 0f, 0f, 0.9f); ((Renderer)obj).sortingOrder = 11; GameObject val2 = new GameObject("Glow"); val2.transform.SetParent(val.transform); val2.transform.localPosition = Vector3.zero; val2.transform.localScale = Vector3.one * 2f; SpriteRenderer obj2 = val2.AddComponent<SpriteRenderer>(); obj2.sprite = CreateCircleSprite(); obj2.color = new Color(1f, 0.2f, 0f, 0.3f); ((Renderer)obj2).sortingOrder = 10; GameObject val3 = new GameObject("OuterGlow"); val3.transform.SetParent(val.transform); val3.transform.localPosition = Vector3.zero; val3.transform.localScale = Vector3.one * 3f; SpriteRenderer obj3 = val3.AddComponent<SpriteRenderer>(); obj3.sprite = CreateCircleSprite(); obj3.color = new Color(1f, 0f, 0f, 0.15f); ((Renderer)obj3).sortingOrder = 9; CircleCollider2D obj4 = val.AddComponent<CircleCollider2D>(); ((Collider2D)obj4).isTrigger = true; obj4.radius = 1.5f; val.AddComponent<Rigidbody2D>().isKinematic = true; BombBehavior bombBehavior = val.AddComponent<BombBehavior>(); bombBehavior.owner = player; bombBehavior.damage = 55f; bombBehavior.lifetime = 8f; activeBombs.Add(val); } private Sprite CreateCircleSprite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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) int num = 32; Texture2D val = new Texture2D(num, num); float num2 = (float)num / 2f; float num3 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); val.SetPixel(j, i, (num4 <= num3) ? Color.white : Color.clear); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } if ((Object)(object)block != (Object)null) { Block obj2 = block; obj2.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj2.BlockAction, new Action<BlockTriggerType>(OnBlock)); } foreach (GameObject activeBomb in activeBombs) { if ((Object)(object)activeBomb != (Object)null) { Object.Destroy((Object)(object)activeBomb); } } activeBombs.Clear(); } } public class FreezeUtility { public class FrozenPlayer { public Player player; public float savedAttackSpeed; public float savedBlockCd; } public class FrozenBullet { public GameObject bullet; public Rigidbody2D rb; public Vector2 savedVelocity; public float savedAngularVelocity; public float savedGravityScale; } public static FrozenPlayer FreezePlayer(Player target) { Gun gun = target.data.weaponHandler.gun; FrozenPlayer result = new FrozenPlayer { player = target, savedAttackSpeed = (((Object)(object)gun != (Object)null) ? gun.attackSpeed : 1f), savedBlockCd = target.data.block.cooldown }; if ((Object)(object)gun != (Object)null) { gun.attackSpeed = float.MaxValue; } target.data.block.cooldown = float.MaxValue; ApplyStun(target, 1f); return result; } public static void HoldFrozenPlayer(FrozenPlayer data) { if (!((Object)(object)data.player == (Object)null) && !data.player.data.dead) { ApplyStun(data.player, 1f); } } public static void UnfreezePlayer(FrozenPlayer data) { if (!((Object)(object)data.player == (Object)null)) { Gun gun = data.player.data.weaponHandler.gun; if ((Object)(object)gun != (Object)null) { gun.attackSpeed = data.savedAttackSpeed; } data.player.data.block.cooldown = data.savedBlockCd; } } private static void ApplyStun(Player target, float duration) { StunHandler val = ((Component)target).GetComponent<StunHandler>(); if ((Object)(object)val == (Object)null) { val = ((Component)target).GetComponentInChildren<StunHandler>(); } if ((Object)(object)val != (Object)null) { try { val.AddStun(duration); } catch { } } } public static FrozenBullet FreezeBullet(GameObject bulletObj) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) Rigidbody2D component = bulletObj.GetComponent<Rigidbody2D>(); if ((Object)(object)component == (Object)null) { return null; } FrozenBullet result = new FrozenBullet { bullet = bulletObj, rb = component, savedVelocity = component.velocity, savedAngularVelocity = component.angularVelocity, savedGravityScale = component.gravityScale }; component.velocity = Vector2.zero; component.angularVelocity = 0f; component.gravityScale = 0f; component.isKinematic = true; return result; } public static void HoldFrozenBullet(FrozenBullet data) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)data.bullet == (Object)null) && !((Object)(object)data.rb == (Object)null)) { if (!data.rb.isKinematic) { data.rb.isKinematic = true; } data.rb.velocity = Vector2.zero; data.rb.angularVelocity = 0f; } } public static void UnfreezeBullet(FrozenBullet data) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)data.bullet == (Object)null) && !((Object)(object)data.rb == (Object)null)) { data.rb.isKinematic = false; data.rb.gravityScale = data.savedGravityScale; data.rb.velocity = data.savedVelocity; data.rb.angularVelocity = data.savedAngularVelocity; } } } public class FunFunFun : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) cardInfo.allowMultiple = false; cardInfo.colorTheme = (CardThemeColorType)7; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { block.cdAdd = 10f; ((Component)player).gameObject.AddComponent<FunFunFunEffect>(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FunFunFunEffect component = ((Component)player).gameObject.GetComponent<FunFunFunEffect>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } protected override string GetTitle() { return "Fun Fun Fun"; } protected override string GetDescription() { return "Block while above an enemy to control them for 5 seconds! You freeze in place while controlling."; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be