using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using ClassesManagerReborn; using ExitGames.Client.Photon; using HarmonyLib; using InControl; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using Photon.Pun; using Photon.Realtime; using RSClasses.MonoBehaviors; using RSClasses.MonoBehaviours; using RSClasses.Utilities; using RarityLib.Utils; using SimulationChamber; using Sonigon; using Sonigon.Internal; using TabInfo.Extensions; using TabInfo.Utils; using ToggleCardsCategories; using UnboundLib; using UnboundLib.Cards; using UnboundLib.Extensions; using UnboundLib.GameModes; using UnboundLib.Networking; using UnityEngine; using UnityEngine.UI; using WeaponsManager; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace RSClasses { public class CardHolder : MonoBehaviour { public List Cards; public List HiddenCards; public static Dictionary cards = new Dictionary(); internal void RegisterCards() { foreach (GameObject card in Cards) { CustomCard.RegisterUnityCard(card, "RSC", card.GetComponent().cardName, true, (Action)null); CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(card.GetComponent()); cards.Add(card.GetComponent().cardName, card.GetComponent()); } foreach (GameObject hiddenCard in HiddenCards) { CustomCard.RegisterUnityCard(hiddenCard, "RSC", hiddenCard.GetComponent().cardName, false, (Action)null); CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(hiddenCard.GetComponent()); Cards.instance.AddHiddenCard(hiddenCard.GetComponent()); cards.Add(hiddenCard.GetComponent().cardName, hiddenCard.GetComponent()); } } } internal class AstronomerClass : ClassHandler { public override IEnumerator Init() { _ = CardHolder.cards["Astronomer"]; ClassesRegistry.Register(CardHolder.cards["Astronomer"], (CardType)1, 0); ClassesRegistry.Register(CardHolder.cards["Domain Extension"], (CardType)16, CardHolder.cards["Astronomer"], 0); ClassesRegistry.Register(CardHolder.cards["Faster Barriers"], (CardType)16, CardHolder.cards["Astronomer"], 0); ClassesRegistry.Register(CardHolder.cards["Gravity Well"], (CardType)16, CardHolder.cards["Astronomer"], 0); ClassesRegistry.Register(CardHolder.cards["Sharper Scythes"], (CardType)16, CardHolder.cards["Astronomer"], 0); ClassesRegistry.Register(CardHolder.cards["Bigger Barriers"], (CardType)8, CardHolder.cards["Astronomer"], 0); ClassesRegistry.Register(CardHolder.cards["Twin Scythes"], (CardType)8, CardHolder.cards["Astronomer"], 0); ClassesRegistry.Register(CardHolder.cards["Stargazer"], (CardType)2, (CardInfo[])(object)new CardInfo[2] { CardHolder.cards["Bigger Barriers"], CardHolder.cards["Twin Scythes"] }, 0); ClassesRegistry.Register(CardHolder.cards["Coupled Comets"], (CardType)16, CardHolder.cards["Stargazer"], 0); ClassesRegistry.Register(CardHolder.cards["Icemelt"], (CardType)16, CardHolder.cards["Stargazer"], 0); ClassesRegistry.Register(CardHolder.cards["Stardust"], (CardType)16, CardHolder.cards["Stargazer"], 0); ClassesRegistry.Register(CardHolder.cards["Stellar Impact"], (CardType)16, CardHolder.cards["Stargazer"], 0); ClassesRegistry.Register(CardHolder.cards["Guardian"], (CardType)2, (CardInfo[])(object)new CardInfo[2] { CardHolder.cards["Bigger Barriers"], CardHolder.cards["Twin Scythes"] }, 0); ClassesRegistry.Register(CardHolder.cards["Perfect Guard"], (CardType)8, CardHolder.cards["Shield Spikes"], 0); ClassesRegistry.Register(CardHolder.cards["Shield Spikes"], (CardType)16, CardHolder.cards["Guardian"], 0); ClassesRegistry.Register(CardHolder.cards["Healing Shield"], (CardType)16, CardHolder.cards["Guardian"], 0); ClassesRegistry.Register(CardHolder.cards["Harvester"], (CardType)2, (CardInfo[])(object)new CardInfo[2] { CardHolder.cards["Bigger Barriers"], CardHolder.cards["Twin Scythes"] }, 0); ClassesRegistry.Register(CardHolder.cards["Harvest Sickle"], (CardType)8, CardHolder.cards["Harvester"], 0); ClassesRegistry.Register(CardHolder.cards["Soul Scythe"], (CardType)16, CardHolder.cards["Harvester"], 0); ClassesRegistry.Register(CardHolder.cards["Death's Blade"], (CardType)16, CardHolder.cards["Harvester"], 0); ClassesRegistry.Register(CardHolder.cards["Dark Harvest"], (CardType)16, CardHolder.cards["Harvest Sickle"], 0); yield return null; } } internal class KnightClass : ClassHandler { public override IEnumerator Init() { _ = CardHolder.cards["Knight"]; ClassesRegistry.Register(CardHolder.cards["Knight"], (CardType)1, 0); ClassesRegistry.Register(CardHolder.cards["Longsword"], (CardType)16, CardHolder.cards["Knight"], 0); ClassesRegistry.Register(CardHolder.cards["Lunge"], (CardType)8, CardHolder.cards["Knight"], 0); ClassesRegistry.Register(CardHolder.cards["Parry"], (CardType)8, CardHolder.cards["Knight"], 0); ClassesRegistry.Register(CardHolder.cards["Crusader"], (CardType)2, CardHolder.cards["Parry"], 0); ClassesRegistry.Register(CardHolder.cards["Heavily Armored"], (CardType)16, CardHolder.cards["Crusader"], 0); ClassesRegistry.Register(CardHolder.cards["Divine Smite"], (CardType)8, CardHolder.cards["Crusader"], 0); ClassesRegistry.Register(CardHolder.cards["Shield Bash"], (CardType)16, CardHolder.cards["Crusader"], 0); ClassesRegistry.Register(CardHolder.cards["Absolute End"], (CardType)16, CardHolder.cards["Divine Smite"], 0); ClassesRegistry.Register(CardHolder.cards["Spectre"], (CardType)2, CardHolder.cards["Lunge"], 0); ClassesRegistry.Register(CardHolder.cards["Ghostly Form"], (CardType)16, CardHolder.cards["Spectre"], 0); ClassesRegistry.Register(CardHolder.cards["Refine Blade"], (CardType)16, CardHolder.cards["Spectre"], 0); ClassesRegistry.Register(CardHolder.cards["Spectral Saber"], (CardType)8, CardHolder.cards["Spectre"], 0); ClassesRegistry.Register(CardHolder.cards["Phantom Lunge"], (CardType)16, CardHolder.cards["Spectral Saber"], 0); yield return null; } } internal class MirrorMageClass : ClassHandler { public override IEnumerator Init() { _ = CardHolder.cards["Mirror Mage"]; ClassesRegistry.Register(CardHolder.cards["Mirror Mage"], (CardType)1, 0); ClassesRegistry.Register(CardHolder.cards["Polished Mirror"], (CardType)16, CardHolder.cards["Mirror Mage"], 0); ClassesRegistry.Register(CardHolder.cards["Prism"], (CardType)8, CardHolder.cards["Mirror Mage"], 0); ClassesRegistry.Register(CardHolder.cards["Reflection Replacement"], (CardType)8, CardHolder.cards["Mirror Mage"], 0); ClassesRegistry.Register(CardHolder.cards["Mirror Mind"], (CardType)8, CardHolder.cards["Reflection Replacement"], 0); ClassesRegistry.Register(CardHolder.cards["Fracture"], (CardType)8, CardHolder.cards["Reflection Replacement"], 0); ClassesRegistry.Register(CardHolder.cards["Voidseer"], (CardType)2, CardHolder.cards["Fracture"], 0); ClassesRegistry.Register(CardHolder.cards["Shatter"], (CardType)16, CardHolder.cards["Voidseer"], 0); ClassesRegistry.Register(CardHolder.cards["Weakened Mirror"], (CardType)16, CardHolder.cards["Voidseer"], 0); ClassesRegistry.Register(CardHolder.cards["Forced Reflection"], (CardType)16, CardHolder.cards["Voidseer"], 0); ClassesRegistry.Register(CardHolder.cards["Forced Refraction"], (CardType)16, (CardInfo[])(object)new CardInfo[2] { CardHolder.cards["Voidseer"], CardHolder.cards["Prism"] }, 0); ClassesRegistry.Register(CardHolder.cards["Kaleido Witch"], (CardType)2, (CardInfo[])(object)new CardInfo[2] { CardHolder.cards["Prism"], CardHolder.cards["Mirror Mind"] }, 0); ClassesRegistry.Register(CardHolder.cards["Emerald Glitter"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0); ClassesRegistry.Register(CardHolder.cards["Ruby Dust"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0); ClassesRegistry.Register(CardHolder.cards["Sapphire Shards"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0); ClassesRegistry.Register(CardHolder.cards["Kaleido Party"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0); yield return null; } } public class AbsoluteKill : MonoBehaviour { public class AbsoluteKillHitEffect : RayHitEffect { public bool active = true; public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0020: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hit.transform) || !active) { return (HasToReturn)1; } Player component = ((Component)hit.transform).GetComponent(); if (component != null && (Object)(object)component != (Object)null) { component.data.stats.remainingRespawns = 0; if (component.data.view.IsMine) { component.data.view.RPC("RPCA_Die", (RpcTarget)0, new object[1] { hit.normal }); } } return (HasToReturn)1; } } internal Gun sword; private ObjectsToSpawn effect; private void Start() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown WeaponManager componentInParent = ((Component)this).GetComponentInParent(); sword = componentInParent.GetWeapon("RSC_Sword"); effect = new ObjectsToSpawn(); effect.AddToProjectile = new GameObject("AbsoluteKillEffect", new Type[1] { typeof(AbsoluteKillHitEffect) }); sword.objectsToSpawn = CollectionExtensions.AddItem((IEnumerable)sword.objectsToSpawn, effect).ToArray(); } private void OnDestroy() { sword.objectsToSpawn = sword.objectsToSpawn.Where((ObjectsToSpawn x) => (Object)(object)x.effect.GetComponent() == (Object)null).ToArray(); } } public class AnimationParticlePlayer : MonoBehaviour { private ParticleSystem[] particles; private void Start() { particles = ((Component)this).GetComponentsInChildren(); } private void PlayParticles() { ParticleSystem[] array = particles; foreach (ParticleSystem val in array) { val.Play(); } } } public class HeaterShield : MonoBehaviour { private Player player; private float rotVel; private float currentRot; private Transform position; internal GameObject shieldCollider; private void Start() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); ((Graphic)((Component)this).GetComponentInChildren()).color = player.GetTeamColors().color; position = ((Component)this).transform.GetChild(0); shieldCollider = ((Component)position.GetChild(0)).gameObject; shieldCollider.transform.SetParent((Transform)null); } private void OnDisable() { shieldCollider.SetActive(false); } private void OnEnable() { shieldCollider.SetActive(true); } private void OnDestroy() { Object.Destroy((Object)(object)shieldCollider); } private void Update() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_00e5: Unknown result type (might be due to invalid IL or missing references) float num = Vector2.SignedAngle(Vector2.up, Vector2.op_Implicit(player.data.aimDirection)); if (num - currentRot > 180f) { currentRot += 360f; } if (currentRot - num > 180f) { currentRot -= 360f; } rotVel = FRILerp.Lerp(rotVel, (num - currentRot) * 2.5f, 10f); currentRot += rotVel * TimeHandler.deltaTime; ((Component)this).transform.localEulerAngles = new Vector3(0f, 0f, currentRot); shieldCollider.transform.SetPositionAndRotation(position.position, position.rotation); } } public class KaleidoBounce : MonoBehaviour { private float sinceBounce = 1f; private Camera mainCam; private RayHitReflect reflect; private Vector2 lastNormal; private ProjectileHit projHit; private RayHitBulletSound bulletSound; private PhotonView view; private bool positive; private bool positive2; private void Start() { //IL_00a7: 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_00d5: 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) ((Component)this).GetComponentInParent().childRPCsVector2Vector2IntInt.Add("KaleidoBounce", DoHit); view = ((Component)this).GetComponentInParent(); bulletSound = ((Component)this).GetComponentInParent(); projHit = ((Component)this).GetComponentInParent(); MirrorBounce[] componentsInChildren = ((Component)((Component)this).transform.root).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (i > 0) { Object.Destroy((Object)(object)componentsInChildren[i]); } } mainCam = ((Component)((Component)MainCam.instance).transform).GetComponent(); reflect = ((Component)this).GetComponentInParent(); positive = ((Component)this).transform.position.x + ((Component)this).transform.position.y > 0f; positive2 = ((Component)this).transform.position.x - ((Component)this).transform.position.y > 0f; } private void FixedUpdate() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00fc: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) sinceBounce += Time.fixedDeltaTime; if (!view.IsMine || sinceBounce < 0.1f || (((Component)this).transform.position.x + ((Component)this).transform.position.y != 0f && ((Component)this).transform.position.x + ((Component)this).transform.position.y > 0f == positive && ((Component)this).transform.position.x - ((Component)this).transform.position.y != 0f && ((Component)this).transform.position.x - ((Component)this).transform.position.y > 0f == positive2)) { return; } RaycastHit2D val = default(RaycastHit2D); Vector2 val2 = new Vector2(1f, -1f); ((RaycastHit2D)(ref val)).normal = ((Vector2)(ref val2)).normalized; if (Math.Abs(((Component)this).transform.position.x + ((Component)this).transform.position.y) < Math.Abs(((Component)this).transform.position.x - ((Component)this).transform.position.y)) { val2 = new Vector2(1f, 1f); ((RaycastHit2D)(ref val)).normal = ((Vector2)(ref val2)).normalized; } ((RaycastHit2D)(ref val)).point = Vector2.op_Implicit(((Component)this).transform.position); int num = -1; if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform)) { PhotonView component = ((Component)((RaycastHit2D)(ref val)).transform.root).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { num = component.ViewID; } } int num2 = -1; if (num == -1) { Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] == (Object)(object)((RaycastHit2D)(ref val)).collider) { num2 = i; } } } ((Component)this).GetComponentInParent().CallFunction("KaleidoBounce", ((RaycastHit2D)(ref val)).point, ((RaycastHit2D)(ref val)).normal, num, num2); sinceBounce = 0f; } private void DoHit(Vector2 hitPos, Vector2 hitNormal, int viewID = -1, int colliderID = -1) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) HitInfo val = new HitInfo(); val.point = hitPos; val.normal = hitNormal; val.collider = null; if (viewID != -1) { PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); val.collider = ((Component)photonView).GetComponentInChildren(); val.transform = ((Component)photonView).transform; } else if (colliderID != -1) { val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren()[colliderID]; val.transform = ((Component)val.collider).transform; } DynamicParticles.instance.PlayBulletHit(projHit.damage, ((Component)this).transform, val, projHit.projectileColor); ((RayHitEffect)bulletSound).DoHitEffect(val); if ((Object)(object)reflect != (Object)null) { ((RayHitEffect)reflect).DoHitEffect(val); } if ((Object)(object)reflect == (Object)null || reflect.reflects <= 0) { ExtensionMethods.InvokeMethod((object)projHit, "DestroyMe", Array.Empty()); } } } public class Lunge : MonoBehaviour { private Gun sword; private Player player; private void Start() { player = ((Component)this).GetComponentInParent(); WeaponManager componentInParent = ((Component)this).GetComponentInParent(); sword = componentInParent.GetWeapon("RSC_Sword"); Gun obj = sword; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); } private void OnDestroy() { Gun obj = sword; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); } private void OnShootProjectileAction(GameObject bullet) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(player.data.aimDirection); player.data.healthHandler.TakeForce(val * 15000f * Mathf.Min(sword.attackSpeed * sword.attackSpeedMultiplier, 2f), (ForceMode2D)1, true, true, 0f); } } public class MirrorBounce : MonoBehaviour { private float sinceBounce = 1f; private Camera mainCam; private RayHitReflect reflect; private Vector2 lastNormal; private ProjectileHit projHit; private RayHitBulletSound bulletSound; private PhotonView view; private bool positive; private void Start() { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponentInParent().childRPCsVector2Vector2IntInt.Add("MirrorBounce", DoHit); view = ((Component)this).GetComponentInParent(); bulletSound = ((Component)this).GetComponentInParent(); projHit = ((Component)this).GetComponentInParent(); MirrorBounce[] componentsInChildren = ((Component)((Component)this).transform.root).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (i > 0) { Object.Destroy((Object)(object)componentsInChildren[i]); } } mainCam = ((Component)((Component)MainCam.instance).transform).GetComponent(); reflect = ((Component)this).GetComponentInParent(); positive = ((Component)this).transform.position.x > 0f; } private void FixedUpdate() { //IL_003f: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) sinceBounce += Time.fixedDeltaTime; if (!view.IsMine || sinceBounce < 0.1f || (((Component)this).transform.position.x != 0f && ((Component)this).transform.position.x > 0f == positive)) { return; } RaycastHit2D val = default(RaycastHit2D); ((RaycastHit2D)(ref val)).normal = Vector2.right; ((RaycastHit2D)(ref val)).point = Vector2.op_Implicit(((Component)this).transform.position); int num = -1; if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform)) { PhotonView component = ((Component)((RaycastHit2D)(ref val)).transform.root).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { num = component.ViewID; } } int num2 = -1; if (num == -1) { Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] == (Object)(object)((RaycastHit2D)(ref val)).collider) { num2 = i; } } } ((Component)this).GetComponentInParent().CallFunction("MirrorBounce", ((RaycastHit2D)(ref val)).point, ((RaycastHit2D)(ref val)).normal, num, num2); sinceBounce = 0f; } private void DoHit(Vector2 hitPos, Vector2 hitNormal, int viewID = -1, int colliderID = -1) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) HitInfo val = new HitInfo(); val.point = hitPos; val.normal = hitNormal; val.collider = null; if (viewID != -1) { PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); val.collider = ((Component)photonView).GetComponentInChildren(); val.transform = ((Component)photonView).transform; } else if (colliderID != -1) { val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren()[colliderID]; val.transform = ((Component)val.collider).transform; } DynamicParticles.instance.PlayBulletHit(projHit.damage, ((Component)this).transform, val, projHit.projectileColor); ((RayHitEffect)bulletSound).DoHitEffect(val); if ((Object)(object)reflect != (Object)null) { ((RayHitEffect)reflect).DoHitEffect(val); } if ((Object)(object)reflect == (Object)null || reflect.reflects <= 0) { ExtensionMethods.InvokeMethod((object)projHit, "DestroyMe", Array.Empty()); } } } public class Parry : MonoBehaviour { private Gun sword; private void Start() { WeaponManager componentInParent = ((Component)this).GetComponentInParent(); sword = componentInParent.GetWeapon("RSC_Sword"); Transform child = ((Component)sword).transform.GetChild(1); ((Component)child.GetChild(4).GetChild(1)).gameObject.SetActive(true); Transform child2 = child.GetChild(5); ((Component)child2.GetChild(3)).gameObject.SetActive(true); ((Component)child2.GetChild(1).GetChild(1)).gameObject.SetActive(true); ((Component)child2.GetChild(2).GetChild(1)).gameObject.SetActive(true); } private void OnDestroy() { Transform child = ((Component)sword).transform.GetChild(1); ((Component)child.GetChild(4).GetChild(1)).gameObject.SetActive(false); Transform child2 = child.GetChild(5); ((Component)child2.GetChild(3)).gameObject.SetActive(false); ((Component)child2.GetChild(1).GetChild(1)).gameObject.SetActive(false); ((Component)child2.GetChild(2).GetChild(1)).gameObject.SetActive(false); } } public class PhantomLunge : MonoBehaviour { private Gun sword; private Player player; private int framesCollisionDisabled; private PlayerCollision collision; private ParticleSystem particle; private void Start() { player = ((Component)this).GetComponentInParent(); WeaponManager componentInParent = ((Component)this).GetComponentInParent(); sword = componentInParent.GetWeapon("RSC_Sword"); Gun obj = sword; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); collision = ((Component)player).GetComponent(); particle = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)collision).enabled = framesCollisionDisabled <= 0; if (framesCollisionDisabled == 0) { collision.IgnoreWallForFrames(2); } if (framesCollisionDisabled < 0 && Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(((Component)this).transform.position), 0.01f, LayerMask.GetMask(new string[1] { "Default" }))) && player.data.view.IsMine) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * player.data.maxHealth * 0.25f * Time.fixedDeltaTime, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true); } framesCollisionDisabled--; } private void OnDestroy() { Gun obj = sword; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); } private void OnShootProjectileAction(GameObject bullet) { framesCollisionDisabled = 35; particle.Play(); } } public class PrismBounce : MonoBehaviour { private float sinceBounce = 1f; private Camera mainCam; private RayHitReflect reflect; private Vector2 lastNormal; private ProjectileHit projHit; private RayHitBulletSound bulletSound; private PhotonView view; private bool positive; private void Start() { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponentInParent().childRPCsVector2Vector2IntInt.Add("PrismBounce", DoHit); view = ((Component)this).GetComponentInParent(); bulletSound = ((Component)this).GetComponentInParent(); projHit = ((Component)this).GetComponentInParent(); MirrorBounce[] componentsInChildren = ((Component)((Component)this).transform.root).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (i > 0) { Object.Destroy((Object)(object)componentsInChildren[i]); } } mainCam = ((Component)((Component)MainCam.instance).transform).GetComponent(); reflect = ((Component)this).GetComponentInParent(); positive = ((Component)this).transform.position.y > 0f; } private void FixedUpdate() { //IL_003f: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) sinceBounce += Time.fixedDeltaTime; if (!view.IsMine || sinceBounce < 0.1f || (((Component)this).transform.position.y != 0f && ((Component)this).transform.position.y > 0f == positive)) { return; } RaycastHit2D val = default(RaycastHit2D); ((RaycastHit2D)(ref val)).normal = Vector2.up; ((RaycastHit2D)(ref val)).point = Vector2.op_Implicit(((Component)this).transform.position); int num = -1; if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform)) { PhotonView component = ((Component)((RaycastHit2D)(ref val)).transform.root).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { num = component.ViewID; } } int num2 = -1; if (num == -1) { Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] == (Object)(object)((RaycastHit2D)(ref val)).collider) { num2 = i; } } } ((Component)this).GetComponentInParent().CallFunction("PrismBounce", ((RaycastHit2D)(ref val)).point, ((RaycastHit2D)(ref val)).normal, num, num2); sinceBounce = 0f; } private void DoHit(Vector2 hitPos, Vector2 hitNormal, int viewID = -1, int colliderID = -1) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) HitInfo val = new HitInfo(); val.point = hitPos; val.normal = hitNormal; val.collider = null; if (viewID != -1) { PhotonView photonView = PhotonNetwork.GetPhotonView(viewID); val.collider = ((Component)photonView).GetComponentInChildren(); val.transform = ((Component)photonView).transform; } else if (colliderID != -1) { val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren()[colliderID]; val.transform = ((Component)val.collider).transform; } DynamicParticles.instance.PlayBulletHit(projHit.damage, ((Component)this).transform, val, projHit.projectileColor); ((RayHitEffect)bulletSound).DoHitEffect(val); if ((Object)(object)reflect != (Object)null) { ((RayHitEffect)reflect).DoHitEffect(val); } if ((Object)(object)reflect == (Object)null || reflect.reflects <= 0) { ExtensionMethods.InvokeMethod((object)projHit, "DestroyMe", Array.Empty()); } } } public class ShieldBash : MonoBehaviour { private Player player; private Animator animator; private AttackLevel attackLevel; private Transform shieldCollider; private const float force = 20000f; private const float mapObjForce = 60000000f; private void Start() { player = ((Component)this).GetComponentInParent(); HeaterShield componentInChildren = ((Component)player).GetComponentInChildren(); animator = ((Component)componentInChildren).GetComponentInChildren(); shieldCollider = componentInChildren.shieldCollider.transform; attackLevel = ((Component)this).GetComponent(); Block block = player.data.block; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, new Action(OnBlock)); } private void OnDestroy() { try { Block block = player.data.block; block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); } catch { } } private void OnBlock(BlockTriggerType trigger) { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) animator.Play("Shield Bash"); RaycastHit2D[] array = Physics2D.BoxCastAll(Vector2.op_Implicit(shieldCollider.position), Vector2.op_Implicit(shieldCollider.lossyScale), shieldCollider.eulerAngles.z, Vector2.op_Implicit(shieldCollider.up), 1f, LayerMask.op_Implicit(PlayerManager.instance.canSeePlayerMask)); RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D val = array2[i]; Debug.Log((object)((Object)((Component)((RaycastHit2D)(ref val)).transform).gameObject).name); Collider2D collider = ((RaycastHit2D)(ref val)).collider; CharacterData val2 = ((collider != null) ? ((Component)collider).GetComponentInParent() : null); if ((Object)(object)val2 != (Object)null && player.data.view.IsMine) { val2.view.RPC("RPCA_AddSlow", (RpcTarget)0, new object[1] { 0.75f }); val2.healthHandler.CallTakeForce(Vector2.op_Implicit(shieldCollider.up * 20000f * attackLevel.LevelScale()), (ForceMode2D)1, false, false, 0f); } if ((Object)(object)((RaycastHit2D)(ref val)).rigidbody != (Object)null) { ((RaycastHit2D)(ref val)).rigidbody.AddForce(Vector2.op_Implicit(shieldCollider.up * 60000000f * attackLevel.LevelScale())); } } } } public class SovereignBladeMono : MonoBehaviour, IOnEventCallback { private enum BladeState { Idle, Preparing, Attacking, Returning } private List hitTargets = new List(); private ParticleSystem chargeParticles; internal PhotonView view; private GameObject blade; private Player player; private float targetRot = 0f; private float targetSpin = 0f; private float rotVel = 0f; private float spinVel = 0f; private float currentRot = 0f; private float currentSpin = 0f; private BladeState status = BladeState.Idle; public float spring = 25f; public float drag = 25f; private Vector2 targetPos; private Vector3 posVel = Vector3.zero; internal static byte InitEventCode = 65; private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0); private void Start() { //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.AddCallbackTarget((object)this); player = ((Component)this).GetComponentInParent(); if (player.data.view.IsMine) { view = ((Component)this).gameObject.GetComponent(); if (PhotonNetwork.AllocateViewID(view)) { object[] data = new object[2] { player.playerID, view.ViewID }; RaiseEventOptions raiseEventOptions = new RaiseEventOptions { Receivers = (ReceiverGroup)0, CachingOption = (EventCaching)4 }; SendOptions val = default(SendOptions); ((SendOptions)(ref val)).Reliability = true; SendOptions sendOptions = val; ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate { //IL_0012: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.RaiseEvent(InitEventCode, (object)data, raiseEventOptions, sendOptions); }); PhotonNetwork.RemoveCallbackTarget((object)this); } else { Debug.LogError((object)"Failed to allocate a ViewId to Sovereign Blade."); } } blade = ((Component)((Component)this).transform.GetChild(0)).gameObject; ((Graphic)((Component)blade.transform.GetChild(0)).GetComponent()).color = player.GetTeamColors().particleEffect; blade.transform.parent = null; chargeParticles = blade.GetComponent(); if (PlayerExtensions.GetAdditionalData(player).colorID == 165) { ((Graphic)((Component)blade.transform).GetComponent()).color = player.GetTeamColors().color; MainModule main = chargeParticles.main; MinMaxGradient startColor = ((MainModule)(ref main)).startColor; ((MinMaxGradient)(ref startColor)).colorMin = player.GetTeamColors().backgroundColor; ((MinMaxGradient)(ref startColor)).colorMax = player.GetTeamColors().color; ((MainModule)(ref main)).startColor = startColor; } Block block = player.data.block; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, new Action(OnBlock)); } private void OnDestroy() { Block block = player.data.block; block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); Object.Destroy((Object)(object)blade); } public void OnEvent(EventData photonEvent) { byte code = photonEvent.Code; if (code == InitEventCode) { object[] array = (object[])photonEvent.CustomData; if (player.playerID == (int)array[0]) { view = ((Component)this).gameObject.GetComponent(); view.ViewID = (int)array[1]; PhotonNetwork.RemoveCallbackTarget((object)this); } } } private void FixedUpdate() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) if (!player.data.view.IsMine || status != BladeState.Attacking) { hitTargets.Clear(); return; } Vector2 val = Vector2.op_Implicit(blade.transform.position); Vector2 val2 = new Vector2(2.25f * player.data.GetAdditionalData().bladeSize, 0.55f * player.data.GetAdditionalData().bladeSize); Quaternion rotation = blade.transform.rotation; Collider2D[] array = Physics2D.OverlapBoxAll(val, val2, ((Quaternion)(ref rotation)).eulerAngles.z); Collider2D[] array2 = array; foreach (Collider2D val3 in array2) { if (hitTargets.Contains(val3)) { continue; } hitTargets.Add(val3); Damagable component = ((Component)val3).gameObject.GetComponent(); HealthHandler component2 = ((Component)val3).gameObject.GetComponent(); float num = player.data.weaponHandler.gun.damage * 55f; if (Object.op_Implicit((Object)(object)component2)) { Player val4 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player"); if ((Object)(object)val4 == (Object)(object)player) { continue; } SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform); Vector3 right = blade.transform.right; component2.CallTakeForce(Vector2.op_Implicit(((Vector3)(ref right)).normalized * 2500f), (ForceMode2D)1, true, false, 0f); if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent().blockedThisFrame) { continue; } } if (Object.op_Implicit((Object)(object)component)) { Vector2 val5 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(blade.transform.position); component.CallTakeDamage(((Vector2)(ref val5)).normalized * num, Vector2.op_Implicit(blade.transform.position), blade, player, true); } } } private void OnEnable() { blade.SetActive(true); } private void OnDisable() { blade.SetActive(false); } private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01be: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.up * 3f; switch (status) { case BladeState.Idle: { ((Component)this).transform.Rotate(Vector3.forward, (0f - Time.deltaTime) * 60f); blade.transform.position = ((Component)this).transform.position + val; bool flag2 = player.data.aimDirection.x > 0f; targetRot = (flag2 ? 0f : 180f); targetSpin = 0f; break; } case BladeState.Preparing: if (targetRot == 0f) { targetSpin = Vector2.SignedAngle(Vector2.left, Vector2.op_Implicit(blade.transform.position) - targetPos); } else { targetSpin = 0f - Vector2.SignedAngle(Vector2.right, Vector2.op_Implicit(blade.transform.position) - targetPos); } break; case BladeState.Attacking: { posVel = FRILerp.Lerp(posVel, (Vector2.op_Implicit(targetPos) - blade.transform.position) * spring, 50f); Transform transform2 = blade.transform; transform2.position += posVel * TimeHandler.deltaTime; break; } case BladeState.Returning: { posVel = FRILerp.Lerp(posVel, (((Component)this).transform.position + val - blade.transform.position) * spring, drag); Transform transform = blade.transform; transform.position += posVel * TimeHandler.deltaTime; bool flag = player.data.aimDirection.x > 0f; targetRot = (flag ? 0f : 180f); targetSpin = 0f; break; } } rotVel = FRILerp.Lerp(rotVel, (targetRot - currentRot) * spring, drag); spinVel = FRILerp.Lerp(spinVel, (targetSpin - currentSpin) * spring, drag); currentRot += rotVel * TimeHandler.deltaTime; currentSpin += spinVel * TimeHandler.deltaTime; blade.transform.localEulerAngles = new Vector3(0f, currentRot, currentSpin); blade.transform.localScale = new Vector3(0.005f, 0.005f, 0.005f) * player.data.GetAdditionalData().bladeSize; } [PunRPC] public void StartBladeAttack(Vector2 pos) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) targetPos = pos; status = BladeState.Preparing; chargeParticles.Play(); soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master; SoundManager.Instance.PlayAtPosition(RSClasses.sovereignBladeChargeSound, ((Component)this).transform, ((Component)this).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 0.5f, (Action)delegate { status = BladeState.Attacking; }); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 0.6f, (Action)delegate { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) GamefeelManager.GameFeel(Vector2.op_Implicit(blade.transform.right * 10f)); SoundManager.Instance.PlayAtPosition(RSClasses.sovereignBladeStrikeSound, ((Component)this).transform, ((Component)this).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); }); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1.5f, (Action)delegate { status = BladeState.Returning; }); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1.75f, (Action)delegate { status = BladeState.Idle; }); } private void OnBlock(BlockTriggerType trigger) { //IL_0001: 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_0046: Invalid comparison between Unknown and I4 //IL_0077: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bb: Unknown result type (might be due to invalid IL or missing references) if ((int)trigger == 0 && player.data.view.IsMine && status == BladeState.Idle) { if ((int)player.data.input.inputType == 1) { targetPos = Vector2.op_Implicit(MainCam.instance.cam.ScreenToWorldPoint(Input.mousePosition)); } else { targetPos = Vector2.op_Implicit(((Component)this).transform.position + player.data.aimDirection * 30f); } view.RPC("StartBladeAttack", (RpcTarget)0, new object[1] { targetPos }); } } } public class SwordLength_Mono : MonoBehaviour { private Gun gun; private Transform blade; private void Start() { gun = ((Component)this).GetComponent(); blade = ((Component)this).transform.Find("Spring/Blade"); ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)RSClasses.instance, 1, (Action)delegate { //IL_0036: Unknown result type (might be due to invalid IL or missing references) Image[] componentsInChildren = ((Component)this).GetComponentsInChildren(); foreach (Image val in componentsInChildren) { if (((Object)val).name == "Color") { ((Graphic)val).color = gun.player.GetTeamColors().color; } } }); } private void Update() { //IL_0023: 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) float num = CalculateLength(gun.projectileSpeed); blade.localScale = new Vector3(num, 0.15f, 1f); blade.localPosition = new Vector3(0f, num / 2f, 0f); gun.numberOfProjectiles = 1; gun.bursts = 1; gun.reloadTime = 0.25f; gun.reloadTimeAdd = 0f; } internal static float CalculateLength(float projectileSpeed) { return Mathf.Clamp(2f * ((float)Math.Log10(projectileSpeed) + 1f), 1f, 10f); } } public class SwordNoAmmo_Mono : MonoBehaviour { public GunAmmo ammo; private void Update() { ExtensionMethods.SetFieldValue((object)ammo, "currentAmmo", (object)2); ammo.maxAmmo = 2; ammo.reloadTime = 0.01f; ammo.reloadTimeAdd = 0f; } } public class SwordSlash : MonoBehaviour { private class NoDestroyRayHitEffect : RayHitEffect { public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (HasToReturn)0; } } private static GameObject particles; private ProjectileHit bullet; private List hits = new List(); private float range; private bool hitDone = false; private void FixedUpdate() { //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_003b: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) if (hitDone) { return; } Vector3 position = bullet.ownWeapon.transform.position; Vector3 val = bullet.ownWeapon.GetComponent().shootPosition.position - bullet.ownWeapon.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; if (!bullet.view.IsMine) { return; } List first = Physics2D.RaycastAll(Vector2.op_Implicit(bullet.ownWeapon.transform.position), Vector2.op_Implicit(-normalized), 1f, LayerMask.op_Implicit(PlayerManager.instance.canSeePlayerMask)).ToList(); first = first.Concat(Physics2D.RaycastAll(Vector2.op_Implicit(bullet.ownWeapon.transform.position), Vector2.op_Implicit(normalized), range + 0.5f, LayerMask.op_Implicit(PlayerManager.instance.canSeePlayerMask))).ToList(); foreach (RaycastHit2D item in first) { RaycastHit2D current = item; if (!((Object)(object)((RaycastHit2D)(ref current)).collider != (Object)null)) { continue; } HitInfo hitInfo = GetHitInfo(current); HealthHandler component = ((Component)hitInfo.transform).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Component)component).GetComponent() == (Object)(object)bullet.ownPlayer) { continue; } foreach (HitInfo hit in hits) { if (!((Object)(object)hitInfo.transform == (Object)(object)hit.transform)) { } } ((RayHit)bullet).Hit(hitInfo, false); if (!bullet.ownPlayer.data.currentCards.Contains(CardHolder.cards["Spectral Saber"])) { hitDone = true; break; } hits.Append(hitInfo); } } private void Start() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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) if ((Object)(object)particles == (Object)null) { particles = RSClasses.assets.LoadAsset("Sword_Slash_Particles"); } bullet = ((Component)this).GetComponent(); range = SwordLength_Mono.CalculateLength(bullet.ownWeapon.GetComponent().projectileSpeed); Vector3 position = bullet.ownWeapon.transform.position; Vector3 val = bullet.ownWeapon.GetComponent().shootPosition.position - bullet.ownWeapon.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; GameObject val2 = Object.Instantiate(particles, position + normalized * (range + 0.5f), bullet.ownWeapon.transform.rotation); val2.transform.localScale = new Vector3(range, range, range); ((Behaviour)((Component)this).GetComponentInChildren()).enabled = false; ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 0.1f, (Action)delegate { ExtensionMethods.InvokeMethod((object)bullet, "DestroyMe", Array.Empty()); }); RayHitEffect element = (RayHitEffect)(object)new NoDestroyRayHitEffect(); bullet.effects = bullet.effects.Append(element).ToList(); bullet.destroyOnBlock = false; } internal static HitInfo GetHitInfo(RaycastHit2D raycastHit2D) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown return new HitInfo { point = ((RaycastHit2D)(ref raycastHit2D)).point, normal = ((RaycastHit2D)(ref raycastHit2D)).normal, transform = ((RaycastHit2D)(ref raycastHit2D)).transform, collider = ((RaycastHit2D)(ref raycastHit2D)).collider, rigidbody = ((RaycastHit2D)(ref raycastHit2D)).rigidbody }; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rsmind.rounds.RSClasses", "RSClasses", "3.1.4")] [BepInProcess("Rounds.exe")] public class RSClasses : BaseUnityPlugin { private const string ModId = "com.rsmind.rounds.RSClasses"; private const string ModName = "RSClasses"; public const string Version = "3.1.4"; public const string ModInitials = "RSC"; internal static Harmony harmony; internal static SoundEvent reflectSound; internal static SoundEvent shatterSound; internal static SoundEvent stardustSound; internal static SoundEvent sovereignBladeChargeSound; internal static SoundEvent sovereignBladeStrikeSound; private static GameObject cardHolder; public static bool Debug; internal static AssetBundle assets; public static RSClasses instance { get; private set; } private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown harmony = new Harmony("com.rsmind.rounds.RSClasses"); harmony.PatchAll(); assets = AssetUtils.LoadAssetBundleFromResources("rsclassart", typeof(RSClasses).Assembly); if ((Object)(object)assets == (Object)null) { Debug.Log((object)"Failed to load RSClasses asset bundle"); } ToggleCardsCategoriesManager.instance.RegisterCategories("RSC"); cardHolder = assets.LoadAsset("CardHolder"); cardHolder.GetComponent().RegisterCards(); } private void Start() { instance = this; List list = (List)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); if (list.Exists((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo")) { TabinfoInterface.Setup(); } AudioClip val = assets.LoadAsset("reflect.ogg"); SoundContainer val2 = ScriptableObject.CreateInstance(); val2.setting.volumeIntensityEnable = true; val2.audioClip[0] = val; reflectSound = ScriptableObject.CreateInstance(); reflectSound.soundContainerArray[0] = val2; AudioClip val3 = assets.LoadAsset("shatter.ogg"); SoundContainer val4 = ScriptableObject.CreateInstance(); val4.setting.volumeIntensityEnable = true; val4.audioClip[0] = val; shatterSound = ScriptableObject.CreateInstance(); shatterSound.soundContainerArray[0] = val4; AudioClip val5 = assets.LoadAsset("stardustHit.ogg"); SoundContainer val6 = ScriptableObject.CreateInstance(); val6.setting.volumeIntensityEnable = true; val6.audioClip[0] = val5; stardustSound = ScriptableObject.CreateInstance(); stardustSound.soundContainerArray[0] = val6; AudioClip val7 = assets.LoadAsset("SovereignBladeCharge.ogg"); SoundContainer val8 = ScriptableObject.CreateInstance(); val8.setting.volumeIntensityEnable = true; val8.audioClip[0] = val7; sovereignBladeChargeSound = ScriptableObject.CreateInstance(); sovereignBladeChargeSound.soundContainerArray[0] = val8; AudioClip val9 = assets.LoadAsset("SovereignBladeStrike.ogg"); SoundContainer val10 = ScriptableObject.CreateInstance(); val10.setting.volumeIntensityEnable = true; val10.audioClip[0] = val9; sovereignBladeStrikeSound = ScriptableObject.CreateInstance(); sovereignBladeStrikeSound.soundContainerArray[0] = val10; IPunPrefabPool prefabPool = PhotonNetwork.PrefabPool; DefaultPool val11 = (DefaultPool)(object)((prefabPool is DefaultPool) ? prefabPool : null); if (val11 != null) { val11.ResourceCache.Add("Comet", assets.LoadAsset("Comet")); val11.ResourceCache.Add("Stardust", assets.LoadAsset("Stardust")); val11.ResourceCache.Add("Sword_Slash", assets.LoadAsset("Sword_Slash")); } } } } namespace RSClasses.Utilities { [Serializable] public class PlayerAdditionalData { public bool invert; public int posMult; public int scytheCount; public int barrierCount; public int cometCount; public float scytheDamage; public float orbitalRadius; public float barrierSpeed; public float scytheSpeed; public float cometDamage; public float cometSpeed; public float fractureDuration; public float fractureSize; public float reflectionCooldown; public float bladeSize; public PlayerAdditionalData() { invert = false; posMult = 1; scytheCount = 0; barrierCount = 0; scytheDamage = 30f; orbitalRadius = 1f; scytheSpeed = 270f; cometSpeed = 2f; cometDamage = 180f; cometCount = 0; barrierSpeed = 100f; fractureDuration = 1f; fractureSize = 0.0225f; reflectionCooldown = 3f; bladeSize = 1f; } public void Reset() { invert = false; posMult = 1; scytheCount = 0; barrierCount = 0; scytheDamage = 30f; orbitalRadius = 1f; scytheSpeed = 270f; cometSpeed = 2f; cometDamage = 180f; cometCount = 0; barrierSpeed = 100f; fractureDuration = 1f; fractureSize = 0.0225f; reflectionCooldown = 3f; bladeSize = 1f; } } public static class PlayerExtension { public static readonly ConditionalWeakTable data = new ConditionalWeakTable(); public static PlayerAdditionalData GetAdditionalData(this CharacterData chara) { return data.GetOrCreateValue(chara); } public static void AddData(this CharacterData chara, PlayerAdditionalData value) { try { data.Add(chara, value); } catch (Exception) { } } } [HarmonyPatch(typeof(Player), "FullReset")] public class FullResetPatch { private static void Prefix(Player __instance) { __instance.data.GetAdditionalData().Reset(); } } [Serializable] public class PlayerActionsAdditionalData { public PlayerAction selfHarm; public PlayerActionsAdditionalData() { selfHarm = null; } } public static class PlayerActionsExtension { public static readonly ConditionalWeakTable data = new ConditionalWeakTable(); public static PlayerActionsAdditionalData GetAdditionalData(this PlayerActions playerActions) { return data.GetOrCreateValue(playerActions); } public static void AddData(this PlayerActions playerActions, PlayerActionsAdditionalData value) { try { data.Add(playerActions, value); } catch (Exception) { } } } [HarmonyPatch(typeof(PlayerActions))] [HarmonyPatch(/*Could not decode attribute arguments.*/)] [HarmonyPatch(new Type[] { })] internal class PlayerActionsPatchPlayerActions { private static void Postfix(PlayerActions __instance) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown __instance.GetAdditionalData().selfHarm = (PlayerAction)typeof(PlayerActions).InvokeMember("CreatePlayerAction", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, __instance, new object[1] { "Voidseer Hotkey" }); } } [HarmonyPatch(typeof(PlayerActions), "CreateWithControllerBindings")] internal class PlayerActionsPatchCreateWithControllerBindings { private static void Postfix(ref PlayerActions __result) { __result.GetAdditionalData().selfHarm.AddDefaultBinding((InputControlType)11); } } [HarmonyPatch(typeof(PlayerActions), "CreateWithKeyboardBindings")] internal class PlayerActionsPatchCreateWithKeyboardBindings { private static void Postfix(ref PlayerActions __result) { __result.GetAdditionalData().selfHarm.AddDefaultBinding((Key[])(object)new Key[1] { (Key)53 }); } } [HarmonyPatch(typeof(GeneralInput), "Update")] internal class GeneralInputPatchUpdate { private static void Postfix(GeneralInput __instance) { try { if (((OneAxisInputControl)((Component)__instance).GetComponent().playerActions.GetAdditionalData().selfHarm).WasPressed && Object.op_Implicit((Object)(object)((Component)__instance).GetComponentInChildren())) { ((Component)__instance).GetComponentInChildren().Trigger(); } } catch { } } } internal class RarityAdder : MonoBehaviour { public enum Rarity { Trinket, Common, Scarce, Uncommon, Exotic, Rare, Epic, Legendary, Mythical, Divine, Unique } private string[] rarityNames = new string[11] { "Trinket", "Common", "Scarce", "Uncommon", "Exotic", "Rare", "Epic", "Legendary", "Mythical", "Divine", "Unique" }; public Rarity rarity = Rarity.Common; public void Start() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponent().rarity = RarityUtils.GetRarity(rarityNames[(int)rarity]); } } public class RSPlayerStats : MonoBehaviour { [Header("Multiply")] public float barrierSpeed = 1f; public float cometDamage = 1f; public float cometSpeed = 1f; public float fractureSize = 1f; public float orbitalRadius = 1f; public float reflectionCooldown = 1f; public float scytheDamage = 1f; public float scytheSpeed = 1f; [Header("Add")] public int barriers = 0; public int comets = 0; public float fractureDuration = 0f; public int scythes = 0; public float bladeSize = 0f; public void Apply(Player player) { player.data.GetAdditionalData().scytheCount += scythes; player.data.GetAdditionalData().barrierCount += barriers; player.data.GetAdditionalData().scytheDamage *= scytheDamage; player.data.GetAdditionalData().orbitalRadius *= orbitalRadius; player.data.GetAdditionalData().barrierSpeed *= barrierSpeed; player.data.GetAdditionalData().cometCount += comets; player.data.GetAdditionalData().cometDamage *= cometDamage; player.data.GetAdditionalData().scytheSpeed *= scytheSpeed; player.data.GetAdditionalData().cometSpeed *= cometSpeed; player.data.GetAdditionalData().fractureDuration += fractureDuration; player.data.GetAdditionalData().fractureSize *= fractureSize; player.data.GetAdditionalData().reflectionCooldown *= reflectionCooldown; player.data.GetAdditionalData().bladeSize += bladeSize; } } [HarmonyPatch(typeof(ApplyCardStats), "ApplyStats")] public class ApplyPlayerStatsPatch { private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade) { ((Component)__instance).GetComponent()?.Apply(___playerToUpgrade); } } public class TabinfoInterface { public static void Setup() { StatCategory val = TabInfoManager.RegisterCategory("Astronomer Stats", 2); TabInfoManager.RegisterStat(val, "Scythe Count", (Func)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().scytheCount}")); TabInfoManager.RegisterStat(val, "Scythe Damage", (Func)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func)((Player p) => string.Format("{0}", p.data.GetAdditionalData().scytheDamage + (p.data.currentCards.Contains(CardHolder.cards["Dark Harvest"]) ? (p.data.stats.lifeSteal * 50f) : 0f)))); TabInfoManager.RegisterStat(val, "Scythe Speed", (Func)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().scytheSpeed / 250f}")); TabInfoManager.RegisterStat(val, "Barrier Count", (Func)((Player p) => p.data.GetAdditionalData().barrierCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().barrierCount}")); TabInfoManager.RegisterStat(val, "Barrier Speed", (Func)((Player p) => p.data.GetAdditionalData().barrierCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().barrierSpeed / 100f}")); TabInfoManager.RegisterStat(val, "Orbital Size", (Func)((Player p) => p.data.GetAdditionalData().barrierCount > 0 || p.data.GetAdditionalData().scytheCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().orbitalRadius}")); TabInfoManager.RegisterStat(val, "Comet Count", (Func)((Player p) => p.data.GetAdditionalData().cometCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().cometCount}")); TabInfoManager.RegisterStat(val, "Comet Speed", (Func)((Player p) => p.data.GetAdditionalData().cometCount > 0), (Func)((Player p) => $"{p.data.GetAdditionalData().cometSpeed / 2f}")); StatCategory val2 = TabInfoManager.RegisterCategory("Mirror Mage Stats", 2); TabInfoManager.RegisterStat(val2, "Reflection Replacement Cooldown", (Func)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Reflection Replacement"])), (Func)((Player p) => $"{p.data.GetAdditionalData().reflectionCooldown}")); TabInfoManager.RegisterStat(val2, "Fracture Duration", (Func)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Fracture"])), (Func)((Player p) => $"{p.data.GetAdditionalData().fractureDuration}")); TabInfoManager.RegisterStat(val2, "Fracture Size", (Func)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Fracture"])), (Func)((Player p) => $"{p.data.GetAdditionalData().fractureSize / 0.0225f}")); } } } namespace RSClasses.MonoBehaviors { internal class Comet : MonoBehaviourPun { internal Vector3 velocity = new Vector3(0f, 0f, 0f); private bool icemelt = false; private bool stardust = false; private bool stellarImpact = false; private float baseScale = 1f; private float dustTimer = 0f; private float cometSpeed = 2f; private Player player; private TrailRenderer trailRenderer; private Dictionary hitPlayers = new Dictionary(); private Random rand = new Random(DateTime.Now.Millisecond); private const float dustInterval = 0.1f; private const float dustDuration = 2.5f; public void DoHit() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_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_0301: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) if (stardust) { dustTimer += Time.fixedDeltaTime; while (dustTimer > 0.1f) { GameObject newDust = PhotonNetwork.Instantiate("Stardust", ((Component)this).gameObject.transform.position, new Quaternion(0f, 0f, (float)(rand.Next() % 360), (float)(rand.Next() % 360)), (byte)0, (object[])null); newDust.GetComponent().RPC("SetValues", (RpcTarget)0, new object[2] { player.playerID, rand.Next(-120, 120) }); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 2.5f, (Action)delegate { PhotonNetwork.Destroy(newDust); }); dustTimer -= 0.1f; } } float num = 1f; if (stellarImpact) { Mathf.Clamp((((Vector3)(ref velocity)).magnitude / 5f - 1f) * player.data.GetAdditionalData().cometSpeed, 1f, 1.5f * player.data.GetAdditionalData().cometSpeed); } int[] array = hitPlayers.Keys.ToArray(); int[] array2 = array; foreach (int key in array2) { hitPlayers[key] -= TimeHandler.deltaTime; if (hitPlayers[key] <= 0f) { hitPlayers.Remove(key); } } float num3 = ((Component)this).transform.lossyScale.y * 0.9f; Collider2D[] array3 = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).gameObject.transform.position), num3); Collider2D[] array4 = array3; foreach (Collider2D val in array4) { Damagable component = ((Component)val).gameObject.GetComponent(); HealthHandler component2 = ((Component)val).gameObject.GetComponent(); Vector2 val3; if (Object.op_Implicit((Object)(object)component2)) { Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player"); if ((Object)(object)val2 == (Object)(object)player || hitPlayers.ContainsKey(val2.playerID)) { continue; } SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform); val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(((Component)this).gameObject.transform.position); component2.CallTakeForce(((Vector2)(ref val3)).normalized * 2500f, (ForceMode2D)1, true, false, 0f); hitPlayers[val2.playerID] = 1f; if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent().blockedThisFrame) { continue; } } if (Object.op_Implicit((Object)(object)component)) { val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position); component.CallTakeDamage(((Vector2)(ref val3)).normalized * (player.data.GetAdditionalData().cometDamage * num), Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true); } } } public void UpdatePos(Vector3 playerPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00da: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) Vector3 val = playerPos - ((Component)this).gameObject.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Distance(((Component)this).gameObject.transform.position, playerPos) / 2f; float num2 = baseScale; if (icemelt) { num2 *= (((double)num < 7.5) ? (0f - num / 7.5f + 2f) : 1f); } trailRenderer.widthMultiplier = num2; ((Component)this).gameObject.transform.localScale = new Vector3(num2, num2, num2); float num3 = 100f / num; velocity *= (float)Math.Pow(0.949999988079071, Time.fixedDeltaTime); velocity += new Vector3(normalized.x * num3, normalized.y * num3) * Time.fixedDeltaTime; if (((Vector3)(ref velocity)).magnitude > 15f) { velocity *= 15f / ((Vector3)(ref velocity)).magnitude; } Vector3 val2 = velocity * Time.fixedDeltaTime * cometSpeed; if (Vector3.Distance(((Component)this).gameObject.transform.position + val2, playerPos) <= ((Component)this).transform.lossyScale.y * 0.9f) { Vector3 val3 = Vector3.Normalize(playerPos - ((Component)this).gameObject.transform.position); val2 -= 2f * Vector3.Dot(val2, val3) * val3; } Transform transform = ((Component)this).gameObject.transform; transform.position += val2; Quaternion rotation = default(Quaternion); float num4 = (float)Math.Atan2(((Vector3)(ref velocity)).normalized.x, 0f - ((Vector3)(ref velocity)).normalized.y); ((Quaternion)(ref rotation)).eulerAngles = new Vector3(0f, 0f, (float)((double)num4 * (180.0 / Math.PI)) - 90f); ((Component)this).gameObject.transform.rotation = rotation; if (((MonoBehaviourPun)this).photonView.IsMine) { ((MonoBehaviourPun)this).photonView.RPC("SyncVelocity", (RpcTarget)1, new object[1] { velocity }); } } [PunRPC] public void SyncVelocity(Vector3 syncVel) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) velocity = syncVel; } [PunRPC] public void SetAttributes(int ownerID, float scale) { //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) player = PlayerManager.instance.players.Find((Player p) => p.playerID == ownerID); ((Object)this).name = "Comet " + player.playerID; cometSpeed = player.data.GetAdditionalData().cometSpeed; icemelt = player.data.currentCards.Contains(CardHolder.cards["Icemelt"]); stellarImpact = player.data.currentCards.Contains(CardHolder.cards["Stellar Impact"]); stardust = player.data.currentCards.Contains(CardHolder.cards["Stardust"]); baseScale = scale; trailRenderer = ((Component)this).gameObject.GetComponentsInChildren().Last(); ((Component)this).gameObject.GetComponentInChildren().color = player.GetTeamColors().particleEffect * 1.75f; ((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_Color"), player.GetTeamColors().particleEffect); ((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_EmissionColor"), player.GetTeamColors().particleEffect * 1.75f); } public void FixedUpdate() { } } internal class SoulScythe_Mono : MonoBehaviour { private Player player; private Scythe_Mono scythes; private void Start() { player = ((Component)this).GetComponentInParent(); scythes = ((Component)player).GetComponent(); } public void OnKill() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown GameObject val = new GameObject("Scythe", new Type[1] { typeof(Scythe) }); val.transform.SetParent(((Component)player).transform); scythes.scythes.Add(val.GetComponent()); } } [HarmonyPatch(typeof(HealthHandler), "RPCA_Die")] public class SoulScytheDeathPatch { private static void Prefix(HealthHandler __instance) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterData val = (CharacterData)ExtensionMethods.GetFieldValue((object)__instance, "data"); Player lastSourceOfDamage = val.lastSourceOfDamage; if ((Object)(object)lastSourceOfDamage != (Object)null) { SoulScythe_Mono componentInChildren = ((Component)lastSourceOfDamage).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.OnKill(); } } } } } namespace RSClasses.MonoBehaviours { internal class Astro_Mono : MonoBehaviour { private Player player; private Scythe_Mono scythes; private Barrier_Mono barriers; private void Start() { player = ((Component)this).GetComponentInParent(); scythes = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); barriers = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); } private void OnDestroy() { Object.Destroy((Object)(object)scythes); Object.Destroy((Object)(object)barriers); } } internal class Barrier : MonoBehaviour { public bool initialized = false; private Transform origin; private Animator anim; private Player player; private BarrierCollider barrierCollider; private GameObject barrier; private void Start() { //IL_0094: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); barrier = Object.Instantiate(RSClasses.assets.LoadAsset("Barrier"), ((Component)player).transform); barrier.SetActive(true); barrierCollider = ExtensionMethods.GetOrAddComponent(((Component)barrier.transform.GetChild(0)).gameObject, false); anim = barrier.GetComponent(); origin = barrier.GetComponentsInChildren().Last(); SetColor(((Component)player).GetComponent().color); SetScale(player.data.GetAdditionalData().orbitalRadius * (19f / 160f)); initialized = true; } private void Update() { ((Component)barrierCollider).gameObject.SetActive(!player.data.dead); } public void UpdatePos(double angle, float radius) { //IL_0039: 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_0064: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) double num = angle * Math.PI / 180.0; Vector3 localPosition = default(Vector3); ((Vector3)(ref localPosition))..ctor((float)((double)radius * Math.Sin(num)), (float)((double)radius * Math.Cos(num)), 0f); Quaternion rotation = default(Quaternion); ((Quaternion)(ref rotation)).eulerAngles = new Vector3(0f, 0f, 0f - (float)angle); barrier.transform.localPosition = localPosition; barrier.transform.rotation = rotation; ((Component)barrierCollider).transform.position = barrier.transform.position; ((Component)barrierCollider).transform.rotation = barrier.transform.rotation; ((Component)barrierCollider).transform.localScale = Vector3.Scale(barrier.transform.localScale, ((Component)player).transform.localScale); } public void DoHit() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) anim.SetTrigger("OnBlock"); float num = barrier.transform.lossyScale.y * 5f; Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)origin).transform.position), num); if (!player.data.view.IsMine) { return; } Collider2D[] array2 = array; foreach (Collider2D val in array2) { Damagable component = ((Component)val).gameObject.GetComponent(); HealthHandler component2 = ((Component)val).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { continue; } Vector2 val3; if (Object.op_Implicit((Object)(object)component2)) { Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player"); SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)origin).transform, ((Component)component).transform); val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(((Component)player).transform.position); component2.CallTakeForce(((Vector2)(ref val3)).normalized * 5000f, (ForceMode2D)1, true, false, 0f); if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent().blockedThisFrame) { continue; } } val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)origin).transform.position); component.CallTakeDamage(((Vector2)(ref val3)).normalized * (0.1f * player.data.maxHealth + 10f), Vector2.op_Implicit(((Component)origin).transform.position), barrier.gameObject, player, true); } } public void SetColor(Color color) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) barrier.GetComponent().color = color; barrier.GetComponentsInChildren().Last().color = color; } public void SetScale(float scale) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) barrier.transform.localScale = new Vector3(scale, scale, scale); } private void OnDestroy() { Object.Destroy((Object)(object)barrier); Object.Destroy((Object)(object)barrierCollider); } } internal class BarrierCollider : MonoBehaviour { private Player player; private void Start() { ((Component)this).gameObject.layer = LayerMask.NameToLayer("Projectile"); player = ((Component)this).GetComponentInParent(); ((Component)this).gameObject.transform.SetParent((Transform)null, true); } public void Update() { ((Component)this).gameObject.SetActive(!player.data.dead); } } public class Barrier_Mono : MonoBehaviour { private Block block; private double angle = 0.0; public Color color = new Color(1f, 1f, 63f / 85f); private List barriers = new List(); private Player player; private void Start() { player = ((Component)this).GetComponentInParent(); block = ((Component)this).GetComponentInParent().block; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, new Action(OnBlock)); GameModeManager.AddHook("PointStart", (Func)PointStart); } private void FixedUpdate() { angle = (angle - (double)(player.data.GetAdditionalData().barrierSpeed * TimeHandler.deltaTime)) % 360.0; int num = 0; foreach (Barrier barrier in barriers) { double num2 = (angle + (double)(num % 2 * 180 + 45 * (num / 2))) % 360.0; barrier.UpdatePos(num2, player.data.GetAdditionalData().orbitalRadius * 0.0125f); num++; } } private void OnBlock(BlockTriggerType blockTrigger) { if (!player.data.currentCards.Contains(CardHolder.cards["Shield Spikes"])) { return; } foreach (Barrier barrier in barriers) { barrier.DoHit(); } } public void UpdateStats() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) while (barriers.Count() < player.data.GetAdditionalData().barrierCount) { GameObject val = new GameObject("Barrier", new Type[1] { typeof(Barrier) }); val.transform.SetParent(((Component)player).transform); barriers.Add(val.GetComponent()); } while (barriers.Count() > Math.Max(player.data.GetAdditionalData().barrierCount, 0)) { Object.Destroy((Object)(object)barriers[0]); barriers.Remove(barriers[0]); } if (player.data.currentCards.Contains(CardHolder.cards["Guardian"])) { color = new Color(0.4f, 1f, 1f); } else if (player.data.currentCards.Contains(CardHolder.cards["Stargazer"])) { color = player.GetTeamColors().particleEffect * 1.75f; } else if (player.data.currentCards.Contains(CardHolder.cards["Harvester"])) { color = new Color(0.69803923f, 0f, 1f); } foreach (Barrier barrier in barriers) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (barrier.initialized) { ((Component)barrier).GetComponent().SetColor(color); barrier.SetScale(player.data.GetAdditionalData().orbitalRadius * (19f / 160f)); } }); } } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)PointStart); block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); while (barriers.Count() > 0) { Object.Destroy((Object)(object)barriers[0]); barriers.Remove(barriers[0]); } } private IEnumerator PointStart(IGameModeHandler gm) { angle = 0.0; UpdateStats(); yield break; } } public class Comet_Mono : MonoBehaviour { private bool active = false; private List comets = new List(); private Player player; private void Start() { player = ((Component)this).GetComponentInParent(); GameModeManager.AddHook("PickEnd", (Func)PickEnd); GameModeManager.AddHook("BattleStart", (Func)BattleStart); GameModeManager.AddHook("PointEnd", (Func)PointEnd); } private void OnDisable() { foreach (Comet comet in comets) { ((Component)comet).gameObject.SetActive(false); } } private void OnEnable() { foreach (Comet comet in comets) { ((Component)comet).gameObject.SetActive(true); } } private void FixedUpdate() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (!active) { return; } foreach (Comet comet in comets) { comet.UpdatePos(((Component)player).transform.position); if (player.data.view.IsMine) { comet.DoHit(); } } } public void UpdateStats() { //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) if (player.data.view.IsMine) { while (comets.Count() < player.data.GetAdditionalData().cometCount) { GameObject val = PhotonNetwork.Instantiate("Comet", Vector3.zero, Quaternion.identity, (byte)0, (object[])null); comets.Add(val.GetComponent()); } while (comets.Count() > Math.Max(player.data.GetAdditionalData().cometCount, 0)) { PhotonNetwork.Destroy(((Component)comets[0]).gameObject); } foreach (Comet comet2 in comets) { ((MonoBehaviourPun)comet2).photonView.RPC("SetAttributes", (RpcTarget)0, new object[2] { player.playerID, player.data.GetAdditionalData().orbitalRadius + 0.5f }); } } comets.Clear(); Object[] array = Object.FindObjectsOfType(typeof(Comet)); for (int i = 0; i < array.Length; i++) { Comet comet = (Comet)(object)array[i]; if (((Object)comet).name == "Comet " + player.playerID) { comets.Add(comet); } } } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func)PickEnd); GameModeManager.RemoveHook("BattleStart", (Func)BattleStart); GameModeManager.RemoveHook("PointEnd", (Func)PointEnd); while (comets.Count() > 0) { Object.Destroy((Object)(object)comets[0]); comets.Remove(comets[0]); } } private IEnumerator PickEnd(IGameModeHandler gm) { UpdateStats(); yield break; } private IEnumerator BattleStart(IGameModeHandler gm) { int index = 0; foreach (Comet comet in comets) { ((Component)comet).transform.position = ((Component)player).transform.position + new Vector3(0f, 7.5f - (float)(15 * index), 0f); comet.velocity = new Vector3(0f, 0f, 0f); index++; } active = true; yield break; } private IEnumerator PointEnd(IGameModeHandler gm) { active = false; yield break; } } public class ForcedReflection_Mono : MonoBehaviour { private Player player; private void Start() { player = ((Component)this).GetComponentInParent(); Gun gun = player.data.weaponHandler.gun; gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, new Action(OnShootProjectileAction)); } private void OnShootProjectileAction(GameObject obj) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown GameObject val = Object.Instantiate(new GameObject("Forced Reflection Effect", new Type[1] { typeof(ForcedReflectionEffect) }), obj.transform); } } public class ForcedReflectionEffect : RayHitEffect { private Random rand = new Random(DateTime.Now.Millisecond); private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0); private SoundEvent reflectSound; private void Start() { reflectSound = RSClasses.reflectSound; } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0015: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_00ea: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hit.transform)) { return (HasToReturn)1; } Player componentInParent = ((Component)hit.transform).GetComponentInParent(); if (!Object.op_Implicit((Object)(object)componentInParent)) { return (HasToReturn)1; } if (!componentInParent.data.view.IsMine) { return (HasToReturn)1; } if (rand.Next() % 2 == 0) { soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master; SoundManager.Instance.PlayAtPosition(reflectSound, hit.transform, hit.transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); ((Component)componentInParent).GetComponentInParent().IgnoreWallForFrames(2); ((Component)componentInParent).transform.SetPositionAndRotation(new Vector3(0f - ((Component)componentInParent).transform.position.x, ((Component)componentInParent).transform.position.y, ((Component)componentInParent).transform.position.z), ((Component)componentInParent).transform.rotation); componentInParent.data.block.RPCA_DoBlock(false, false, (BlockTriggerType)0, default(Vector3), false); } return (HasToReturn)1; } } public class ForcedRefraction_Mono : MonoBehaviour { private Player player; private void Start() { player = ((Component)this).GetComponentInParent(); Gun gun = player.data.weaponHandler.gun; gun.ShootPojectileAction = (Action)Delegate.Combine(gun.ShootPojectileAction, new Action(OnShootProjectileAction)); } private void OnShootProjectileAction(GameObject obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown GameObject val = new GameObject(); val.AddComponent(); val.transform.SetParent(obj.transform); } } public class ForcedRefractionEffect : RayHitEffect { private Random rand = new Random(DateTime.Now.Millisecond); private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0); private SoundEvent reflectSound; private void Start() { reflectSound = RSClasses.reflectSound; } public override HasToReturn DoHitEffect(HitInfo hit) { //IL_0015: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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_00ff: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hit.transform)) { return (HasToReturn)1; } Player componentInParent = ((Component)hit.transform).GetComponentInParent(); if (!Object.op_Implicit((Object)(object)componentInParent)) { return (HasToReturn)1; } if (componentInParent.data.view.IsMine) { rand.Next(); if (rand.Next() % 2 == 0) { soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master; SoundManager.Instance.PlayAtPosition(reflectSound, hit.transform, hit.transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); ((Component)componentInParent).GetComponentInParent().IgnoreWallForFrames(2); ((Component)componentInParent).transform.SetPositionAndRotation(new Vector3(((Component)componentInParent).transform.position.x, 0f - ((Component)componentInParent).transform.position.y, ((Component)componentInParent).transform.position.z), ((Component)componentInParent).transform.rotation); componentInParent.data.block.RPCA_DoBlock(false, false, (BlockTriggerType)0, default(Vector3), false); } } return (HasToReturn)1; } } internal class HealingShield_Mono : MonoBehaviour { private Player player; private AttackLevel attackLevel; private Transform timerVisualizer; private float healAmount = 20f; private float timer = 0f; private const float scaleFactor = 3f; private void Awake() { player = ((Component)this).GetComponentInParent(); attackLevel = ((Component)this).GetComponent(); timerVisualizer = ((Component)this).transform.GetChild(1); } private void FixedUpdate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = new Vector3(player.data.GetAdditionalData().orbitalRadius * 3f, player.data.GetAdditionalData().orbitalRadius * 3f); timer += Time.fixedDeltaTime; float num = (float)Math.Sqrt(0.0 - Math.Pow(timer, 2.0) + (double)(2f * timer)); timerVisualizer.localScale = new Vector3(num, num); if (timer >= 1f) { if (player.data.view.IsMine) { Heal(); } timer -= 1f; } } private void Heal() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).transform.lossyScale.y / 2f); Collider2D[] array2 = array; foreach (Collider2D val in array2) { HealthHandler component = ((Component)val).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Player component2 = ((Component)component).GetComponent(); if (component2.teamID == player.teamID) { NetworkingManager.RPC(typeof(HealingShield_Mono), "RPCA_Heal", new object[2] { component2.playerID, healAmount * attackLevel.LevelScale() }); } } } } [UnboundRPC] private static void RPCA_Heal(int playerID, float healAmount) { HealthHandler component = ((Component)PlayerManagerExtension.GetPlayerWithID(PlayerManager.instance, playerID)).GetComponent(); component.Heal(healAmount); } } public class KaleidoParty_Mono : MonoBehaviour { private Player player; private Gun gun; public void Start() { player = ((Component)this).GetComponentInParent(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); } public void OnShootProjectileAction(GameObject obj) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)obj)) { RayHitReflect orAddComponent = ExtensionMethods.GetOrAddComponent(obj, false); try { GunAmmo val = (GunAmmo)ExtensionMethods.GetFieldValue((object)gun, "gunAmmo"); int num = (int)ExtensionMethods.GetFieldValue((object)val, "currentAmmo"); orAddComponent.reflects += num - 1; } catch { } } } public void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); } } public class Mirror_Mono : MonoBehaviour { private Player player; private Gun gun; private SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[4]; private static GameObject _stopRecursionObj; private static GameObject _PoisonObj; private static GameObject _DazzleObj; private static GameObject _ColdObj; public static GameObject StopRecursionObj { get { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if ((Object)(object)_stopRecursionObj == (Object)null) { _stopRecursionObj = new GameObject("A_StopRecursion", new Type[1] { typeof(StopRecursion) }); Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj); } return _stopRecursionObj; } } public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { new ObjectsToSpawn { AddToProjectile = StopRecursionObj } }; public static GameObject PoisonObj { get { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if ((Object)(object)_PoisonObj == (Object)null) { _PoisonObj = new GameObject("A_Poison", new Type[1] { typeof(RayHitPoison) }); Object.DontDestroyOnLoad((Object)(object)_PoisonObj); } return _PoisonObj; } } public static ObjectsToSpawn[] PoisonSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { new ObjectsToSpawn { AddToProjectile = PoisonObj } }; public static GameObject DazzleObj { get { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if ((Object)(object)_DazzleObj == (Object)null) { _DazzleObj = new GameObject("A_Dazzle", new Type[1] { typeof(RayHitBash) }); Object.DontDestroyOnLoad((Object)(object)_DazzleObj); } return _DazzleObj; } } public static ObjectsToSpawn[] DazzleSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { new ObjectsToSpawn { AddToProjectile = DazzleObj } }; public static GameObject ColdObj { get { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if ((Object)(object)_ColdObj == (Object)null) { _ColdObj = new GameObject("A_Cold", new Type[1] { typeof(ChillingTouch) }); Object.DontDestroyOnLoad((Object)(object)_ColdObj); } return _ColdObj; } } public static ObjectsToSpawn[] ColdSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { new ObjectsToSpawn { AddToProjectile = ColdObj } }; public void Start() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); if ((Object)(object)savedGuns[0] == (Object)null) { savedGuns[0] = new GameObject("Mirror Gun").AddComponent(); } if ((Object)(object)savedGuns[1] == (Object)null) { savedGuns[1] = new GameObject("Sapphire Gun").AddComponent(); } if ((Object)(object)savedGuns[2] == (Object)null) { savedGuns[2] = new GameObject("Ruby Gun").AddComponent(); } if ((Object)(object)savedGuns[3] == (Object)null) { savedGuns[3] = new GameObject("Emerald Gun").AddComponent(); } foreach (Player item in PlayerManager.instance.players.Where((Player p) => p.playerID != player.playerID)) { ExtensionMethods.GetOrAddComponent(((Component)item).gameObject, false); } } public void OnShootProjectileAction(GameObject obj) { //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_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: 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_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Unknown result type (might be due to invalid IL or missing references) //IL_072e: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07c5: Unknown result type (might be due to invalid IL or missing references) //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_0827: Unknown result type (might be due to invalid IL or missing references) //IL_0832: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) if (obj.GetComponentsInChildren().Length != 0) { return; } SimulatedGun val = savedGuns[0]; val.CopyGunStatsExceptActions(gun); val.CopyAttackAction(gun); val.CopyShootProjectileAction(gun); ((Gun)val).ShootPojectileAction = (Action)Delegate.Remove(((Gun)val).ShootPojectileAction, new Action(OnShootProjectileAction)); ((Gun)val).numberOfProjectiles = 1; ((Gun)val).bursts = 0; ((Gun)val).spread = 0f; ((Gun)val).evenSpread = 0f; ((Gun)val).objectsToSpawn = ((Gun)val).objectsToSpawn.Concat(StopRecursionSpawn).ToArray(); if (player.data.currentCards.Contains(CardHolder.cards["Sapphire Shards"])) { ((Gun)val).slow = 0.7f; ((Gun)val).projectileColor = new Color(0f, 172f, 191f); } SimulatedGun val2 = savedGuns[1]; val2.CopyGunStatsExceptActions(gun); val2.CopyAttackAction(gun); val2.CopyShootProjectileAction(gun); ((Gun)val2).ShootPojectileAction = (Action)Delegate.Remove(((Gun)val2).ShootPojectileAction, new Action(OnShootProjectileAction)); ((Gun)val2).numberOfProjectiles = 1; ((Gun)val2).bursts = 0; ((Gun)val2).spread = 0f; ((Gun)val2).evenSpread = 0f; ((Gun)val2).gravity = ((Gun)val2).gravity * -1f; ((Gun)val2).objectsToSpawn = ((Gun)val2).objectsToSpawn.Concat(StopRecursionSpawn).ToArray(); SimulatedGun val3 = savedGuns[2]; val3.CopyGunStatsExceptActions(gun); val3.CopyAttackAction(gun); val3.CopyShootProjectileAction(gun); ((Gun)val3).ShootPojectileAction = (Action)Delegate.Remove(((Gun)val3).ShootPojectileAction, new Action(OnShootProjectileAction)); ((Gun)val3).numberOfProjectiles = 1; ((Gun)val3).bursts = 0; ((Gun)val3).spread = 0f; ((Gun)val3).evenSpread = 0f; ((Gun)val3).objectsToSpawn = ((Gun)val3).objectsToSpawn.Concat(StopRecursionSpawn).ToArray(); if (player.data.currentCards.Contains(CardHolder.cards["Emerald Glitter"])) { ((Gun)val3).damage = ((Gun)val3).damage * 1.25f; ((Gun)val3).objectsToSpawn = ((Gun)val3).objectsToSpawn.Concat(PoisonSpawn).ToArray(); ((Gun)val3).projectileColor = Color.green; } SimulatedGun val4 = savedGuns[3]; val4.CopyGunStatsExceptActions(gun); val4.CopyAttackAction(gun); val4.CopyShootProjectileAction(gun); ((Gun)val4).ShootPojectileAction = (Action)Delegate.Remove(((Gun)val4).ShootPojectileAction, new Action(OnShootProjectileAction)); ((Gun)val4).numberOfProjectiles = 1; ((Gun)val4).bursts = 0; ((Gun)val4).spread = 0f; ((Gun)val4).evenSpread = 0f; ((Gun)val4).objectsToSpawn = ((Gun)val4).objectsToSpawn.Concat(StopRecursionSpawn).ToArray(); if (player.data.currentCards.Contains(CardHolder.cards["Ruby Dust"])) { ((Gun)val4).objectsToSpawn = ((Gun)val4).objectsToSpawn.Concat(DazzleSpawn).ToArray(); ((Gun)val4).projectileColor = Color.magenta; } if (!player.data.view.IsMine && !PhotonNetwork.OfflineMode) { return; } val.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x * -1f, obj.transform.position.y, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.left) * Vector3.left, 1f, 1f, (Transform)null, false); if (player.data.currentCards.Contains(CardHolder.cards["Prism"])) { if (!player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"])) { val2.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x, obj.transform.position.y * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.up) * Vector3.up, 1f, 1f, (Transform)null, false); } val2.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x * -1f, obj.transform.position.y * -1f, 0f), new Vector3(obj.transform.forward.x * -1f, obj.transform.forward.y * -1f, 0f), 1f, 1f, (Transform)null, false); } if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"])) { val.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x, obj.transform.position.y * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.up) * Vector3.up, 1f, 1f, (Transform)null, false); Vector3 val5 = Quaternion.AngleAxis(45f, Vector3.forward) * Vector3.up; val3.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y, obj.transform.position.x, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, val5) * val5, 1f, 1f, (Transform)null, false); val5 = Quaternion.AngleAxis(45f, Vector3.forward) * Vector3.left; val3.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y * -1f, obj.transform.position.x * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, val5) * val5, 1f, 1f, (Transform)null, false); val4.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y * -1f, obj.transform.position.x, 0f), Quaternion.AngleAxis(90f, Vector3.forward) * obj.transform.forward, 1f, 1f, (Transform)null, false); val4.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y, obj.transform.position.x * -1f, 0f), Quaternion.AngleAxis(270f, Vector3.forward) * obj.transform.forward, 1f, 1f, (Transform)null, false); } } public void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectileAction)); SimulatedGun[] array = savedGuns; foreach (SimulatedGun val in array) { Object.Destroy((Object)(object)val); } } } internal class MirrorMageVisualizer_Mono : MonoBehaviour { private Dictionary> reflections = new Dictionary>(); private Player player; public void Awake() { player = ((Component)this).GetComponentInParent(); } public void OnDisable() { foreach (List value in reflections.Values) { foreach (GameObject item in value) { item.SetActive(false); } } } public void Update() { //IL_00cb: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0477: 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_048c: Unknown result type (might be due to invalid IL or missing references) if (!player.data.view.IsMine) { return; } foreach (Player item in PlayerManager.instance.players.Where((Player p) => p.playerID != player.playerID)) { if (!item.data.currentCards.Contains(CardHolder.cards["Mirror Mage"])) { continue; } if (!reflections.ContainsKey(item.playerID)) { List list = new List(); GameObject val = Object.Instantiate(RSClasses.assets.LoadAsset("Reflection"), ((Component)item).transform); val.transform.SetPositionAndRotation(new Vector3(1000f, 1000f, 1000f), ((Component)item).transform.rotation); val.SetActive(true); val.GetComponent().color = item.GetTeamColors().color; list.Add(val); for (int num = 0; num < 6; num++) { list.Add(Object.Instantiate(val, ((Component)item).transform)); } reflections[item.playerID] = list; } for (int num2 = 0; num2 < 7; num2++) { reflections[item.playerID][num2].SetActive(!item.data.dead); } reflections[item.playerID][0].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.x, ((Component)item).transform.position.y, ((Component)item).transform.position.z), ((Component)item).transform.rotation); if (item.data.currentCards.Contains(CardHolder.cards["Prism"])) { reflections[item.playerID][1].transform.SetPositionAndRotation(new Vector3(((Component)item).transform.position.x, 0f - ((Component)item).transform.position.y, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][2].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.x, 0f - ((Component)item).transform.position.y, ((Component)item).transform.position.z), ((Component)item).transform.rotation); } if (item.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"])) { reflections[item.playerID][3].transform.SetPositionAndRotation(new Vector3(((Component)item).transform.position.y, ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][4].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.y, ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][5].transform.SetPositionAndRotation(new Vector3(((Component)item).transform.position.y, 0f - ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][6].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.y, 0f - ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); } } } private void OnDestroy() { foreach (KeyValuePair> reflection in reflections) { foreach (GameObject item in reflection.Value) { Object.Destroy((Object)(object)item); } } } } [HarmonyPatch(typeof(GeneralInput), "Update")] internal class GeneralInputPatchUpdate { private static GameObject mirror; private static GameObject prism; private static GameObject kaleido1; private static GameObject kaleido2; private static void Postfix(GeneralInput __instance) { //IL_000c: 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_0086: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) Player player = ((CharacterData)ExtensionMethods.GetFieldValue((object)__instance, "data")).player; if ((!player.data.view.IsMine && !PhotonNetwork.OfflineMode) || !player.data.currentCards.Contains(CardHolder.cards["Mirror Mage"])) { return; } if ((Object)(object)mirror == (Object)null) { mirror = new GameObject(); LineRenderer orAddComponent = ExtensionMethods.GetOrAddComponent(mirror, false); orAddComponent.startWidth = 0.25f; orAddComponent.endWidth = 0.25f; ((Renderer)orAddComponent).material = RSClasses.assets.LoadAsset("Mirror"); orAddComponent.SetPositions((Vector3[])(object)new Vector3[2] { new Vector3(0f, -1000f, 0f), new Vector3(0f, 1000f, 0f) }); } if (player.data.currentCards.Contains(CardHolder.cards["Prism"]) && (Object)(object)prism == (Object)null) { prism = new GameObject(); LineRenderer orAddComponent2 = ExtensionMethods.GetOrAddComponent(prism, false); orAddComponent2.startWidth = 0.25f; orAddComponent2.endWidth = 0.25f; ((Renderer)orAddComponent2).material = RSClasses.assets.LoadAsset("Prism"); orAddComponent2.SetPositions((Vector3[])(object)new Vector3[2] { new Vector3(-1000f, 0f, 0f), new Vector3(1000f, 0f, 0f) }); } if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"])) { if ((Object)(object)kaleido1 == (Object)null) { kaleido1 = new GameObject(); LineRenderer orAddComponent3 = ExtensionMethods.GetOrAddComponent(kaleido1, false); orAddComponent3.startWidth = 0.25f; orAddComponent3.endWidth = 0.25f; ((Renderer)orAddComponent3).material = RSClasses.assets.LoadAsset("Kaleido"); orAddComponent3.SetPositions((Vector3[])(object)new Vector3[2] { new Vector3(-1000f, -1000f, 0f), new Vector3(1000f, 1000f, 0f) }); } if ((Object)(object)kaleido2 == (Object)null) { kaleido2 = new GameObject(); LineRenderer orAddComponent4 = ExtensionMethods.GetOrAddComponent(kaleido2, false); orAddComponent4.startWidth = 0.25f; orAddComponent4.endWidth = 0.25f; ((Renderer)orAddComponent4).material = RSClasses.assets.LoadAsset("Kaleido"); orAddComponent4.SetPositions((Vector3[])(object)new Vector3[2] { new Vector3(1000f, -1000f, 0f), new Vector3(-1000f, 1000f, 0f) }); } } if (player.data.currentCards.Contains(CardHolder.cards["Mirror Mind"])) { if (((Component)player).transform.position.x * (float)player.data.GetAdditionalData().posMult > 5f) { player.data.GetAdditionalData().posMult *= -1; } if (((Component)player).transform.position.x * (float)player.data.GetAdditionalData().posMult > 0f) { player.data.GetAdditionalData().invert = !player.data.GetAdditionalData().invert; ((Component)player).transform.position = new Vector3(0f, ((Component)player).transform.position.y, ((Component)player).transform.position.z); ExtensionMethods.SetFieldValue((object)player.data.playerVel, "velocity", (object)Vector2.Scale(new Vector2(-1f, 1f), (Vector2)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "velocity"))); } if (player.data.GetAdditionalData().invert) { __instance.direction = new Vector3(0f - __instance.direction.x, __instance.direction.y, __instance.direction.z); } } } } internal class PolishedMirror_Mono : MonoBehaviour { private Dictionary> reflections = new Dictionary>(); private Player player; public void Awake() { player = ((Component)this).GetComponentInParent(); } public void OnDisable() { foreach (List value in reflections.Values) { foreach (GameObject item in value) { item.SetActive(false); } } } public void Update() { //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0381: 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_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0405: 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_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) if (!player.data.view.IsMine) { return; } foreach (Player item in PlayerManager.instance.players.Where((Player p) => p.playerID != player.playerID)) { if (!reflections.ContainsKey(item.playerID)) { List list = new List(); GameObject val = Object.Instantiate(RSClasses.assets.LoadAsset("Reflection"), ((Component)item).transform); val.transform.SetPositionAndRotation(new Vector3(1000f, 1000f, 1000f), ((Component)item).transform.rotation); val.SetActive(true); val.GetComponent().color = item.GetTeamColors().color; list.Add(val); list.Add(Object.Instantiate(val, ((Component)item).transform)); list.Add(Object.Instantiate(val, ((Component)item).transform)); list.Add(Object.Instantiate(val, ((Component)item).transform)); list.Add(Object.Instantiate(val, ((Component)item).transform)); list.Add(Object.Instantiate(val, ((Component)item).transform)); list.Add(Object.Instantiate(val, ((Component)item).transform)); reflections[item.playerID] = list; } reflections[item.playerID][0].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.x, ((Component)item).transform.position.y, ((Component)item).transform.position.z), ((Component)item).transform.rotation); if (player.data.currentCards.Contains(CardHolder.cards["Prism"])) { reflections[item.playerID][1].transform.SetPositionAndRotation(new Vector3(((Component)item).transform.position.x, 0f - ((Component)item).transform.position.y, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][2].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.x, 0f - ((Component)item).transform.position.y, ((Component)item).transform.position.z), ((Component)item).transform.rotation); } if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"])) { reflections[item.playerID][3].transform.SetPositionAndRotation(new Vector3(((Component)item).transform.position.y, ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][4].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.y, ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][5].transform.SetPositionAndRotation(new Vector3(((Component)item).transform.position.y, 0f - ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); reflections[item.playerID][6].transform.SetPositionAndRotation(new Vector3(0f - ((Component)item).transform.position.y, 0f - ((Component)item).transform.position.x, ((Component)item).transform.position.z), ((Component)item).transform.rotation); } } } private void OnDestroy() { foreach (KeyValuePair> reflection in reflections) { foreach (GameObject item in reflection.Value) { Object.Destroy((Object)(object)item); } } } } internal class Scythe : MonoBehaviour { public bool initialized = false; public bool active = true; public bool ableToHit = true; public bool ableToHitMapObject = true; private Player player; private GameObject scythe; private void Start() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponentInParent(); scythe = Object.Instantiate(RSClasses.assets.LoadAsset("Scythe"), ((Component)player).transform); scythe.SetActive(true); SetColor(((Component)player).GetComponent().color); SetScale(player.data.GetAdditionalData().orbitalRadius * (5f / 32f)); initialized = true; } public void DoHit() { //IL_0007: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) float y = ((Component)this).transform.localScale.y; Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(scythe.transform.position), y); if (!player.data.view.IsMine) { return; } Collider2D[] array2 = array; foreach (Collider2D val in array2) { Damagable component = ((Component)val).gameObject.GetComponent(); HealthHandler component2 = ((Component)val).gameObject.GetComponent(); float num = 1f; if (player.data.currentCards.Contains(CardHolder.cards["Dark Harvest"])) { num += player.data.stats.lifeSteal; } float num2 = player.data.GetAdditionalData().scytheDamage * num; if (Object.op_Implicit((Object)(object)component2) && ableToHit) { Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player"); SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform); ableToHit = false; if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent().blockedThisFrame) { continue; } if (player.data.currentCards.Contains(CardHolder.cards["Death's Blade"])) { num2 = Math.Max(val2.data.health * 0.15f, num2); } } if (Object.op_Implicit((Object)(object)component) && ableToHitMapObject) { ableToHitMapObject = false; Vector2 val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position); component.CallTakeDamage(((Vector2)(ref val3)).normalized * num2, Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true); } } } public void UpdatePos(double angle, float rotation, float radius) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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) double num = angle * Math.PI / 180.0; Vector3 localPosition = default(Vector3); ((Vector3)(ref localPosition))..ctor((float)((double)radius * Math.Sin(num)), (float)((double)radius * Math.Cos(num)), 0f); Quaternion rotation2 = default(Quaternion); ((Quaternion)(ref rotation2)).eulerAngles = new Vector3(0f, 0f, rotation); scythe.transform.localPosition = localPosition; scythe.transform.rotation = rotation2; } public void SetColor(Color color) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) scythe.GetComponent().color = color; } public void SetScale(float scale) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) scythe.transform.localScale = new Vector3(scale, scale, scale); } private void OnDestroy() { Object.Destroy((Object)(object)scythe); } } public class Scythe_Mono : MonoBehaviour { private double angle = 0.0; private float rotation = 0f; private bool active = false; public Color color = new Color(1f, 1f, 63f / 85f); internal List scythes = new List(); private Player player; private void Start() { player = ((Component)this).GetComponentInParent(); GameModeManager.AddHook("PointStart", (Func)PointStart); GameModeManager.AddHook("RoundStart", (Func)RoundStart); GameModeManager.AddHook("PointEnd", (Func)PointEnd); } private void FixedUpdate() { //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) angle += player.data.GetAdditionalData().scytheSpeed * TimeHandler.deltaTime; if (angle > 360.0) { foreach (Scythe scythe in scythes) { scythe.ableToHit = true; scythe.ableToHitMapObject = true; } angle -= 360.0; } rotation = (rotation - 1200f * TimeHandler.deltaTime) % 360f; int num = 0; foreach (Scythe scythe2 in scythes) { double num2 = angle + (double)(360f / (float)scythes.Count() * (float)num); scythe2.UpdatePos(num2, rotation, player.data.GetAdditionalData().orbitalRadius * 2.5f); if (active) { scythe2.DoHit(); } if (scythe2.ableToHit) { Color val = color; val.a = 1f; scythe2.SetColor(val); } else { Color val2 = color; val2.a = 0.5f; scythe2.SetColor(val2); } num++; } } public void UpdateStats() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) while (scythes.Count() < player.data.GetAdditionalData().scytheCount) { GameObject val = new GameObject("Scythe", new Type[1] { typeof(Scythe) }); val.transform.SetParent(((Component)player).transform); scythes.Add(val.GetComponent()); } while (scythes.Count() > Math.Max(player.data.GetAdditionalData().scytheCount, 0)) { Object.Destroy((Object)(object)scythes[0]); scythes.Remove(scythes[0]); } if (player.data.currentCards.Contains(CardHolder.cards["Harvester"])) { color = new Color(0.69803923f, 0f, 1f); } else if (player.data.currentCards.Contains(CardHolder.cards["Stargazer"])) { color = player.GetTeamColors().particleEffect * 1.75f; } else if (player.data.currentCards.Contains(CardHolder.cards["Guardian"])) { color = new Color(0.4f, 1f, 1f); } foreach (Scythe scythe in scythes) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (scythe.initialized) { ((Component)scythe).GetComponent().SetColor(color); scythe.SetScale(player.data.GetAdditionalData().orbitalRadius * (5f / 32f)); } }); } } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)PointStart); GameModeManager.RemoveHook("PointEnd", (Func)PointEnd); while (scythes.Count() > 0) { Object.Destroy((Object)(object)scythes[0]); scythes.Remove(scythes[0]); } } private IEnumerator RoundStart(IGameModeHandler gm) { UpdateStats(); yield break; } private IEnumerator PointStart(IGameModeHandler gm) { active = true; rotation = 0f; angle = 0.0; yield break; } private IEnumerator PointEnd(IGameModeHandler gm) { active = false; yield break; } } internal class ShatterEffect : MonoBehaviour { private GameObject reflection; private Random rand = new Random(DateTime.Now.Millisecond); private List shatters = new List(); private float cooldownTimer = 0f; private Player player; private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0); private void Awake() { player = ((Component)this).gameObject.GetComponentInParent(); } private void Start() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (player.data.view.IsMine) { reflection = Object.Instantiate(RSClasses.assets.LoadAsset("Reflection"), ((Component)player).transform); reflection.SetActive(true); reflection.GetComponent().color = player.GetTeamColors().color; } } public void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0076: Unknown result type (might be due to invalid IL or missing references) if (player.data.view.IsMine) { reflection.transform.SetPositionAndRotation(new Vector3(0f - ((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z), ((Component)player).transform.rotation); } } public void FixedUpdate() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) cooldownTimer = ((cooldownTimer - TimeHandler.deltaTime < 0f) ? 0f : (cooldownTimer - TimeHandler.deltaTime)); if (!player.data.view.IsMine || shatters.Count <= 0) { return; } foreach (GameObject shatter in shatters) { Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(shatter.transform.position), 166.66f * player.data.GetAdditionalData().fractureSize); Collider2D[] array2 = array; foreach (Collider2D val in array2) { HealthHandler component = ((Component)val).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component, "player"); if (val2.playerID != player.playerID) { Vector2 val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(shatter.transform.position); ((Damagable)component).CallTakeDamage(((Vector2)(ref val3)).normalized * Time.fixedDeltaTime * player.data.weaponHandler.gun.damage * 2f, Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true); } } } } } public void TriggerReflect() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) if (cooldownTimer == 0f) { soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1.15f * Optionshandler.vol_Master; SoundManager.Instance.PlayAtPosition(RSClasses.reflectSound, ((Component)player).transform, ((Component)player).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); ((Component)player).GetComponent().IgnoreWallForFrames(2); ((Component)player).transform.SetPositionAndRotation(new Vector3(0f - ((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z), ((Component)player).transform.rotation); ExtensionMethods.SetFieldValue((object)player.data.playerVel, "velocity", (object)Vector2.Scale(new Vector2(-1f, 1f), (Vector2)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "velocity"))); if (player.data.view.IsMine) { player.data.block.RPCA_DoBlock(true, false, (BlockTriggerType)0, default(Vector3), false); } cooldownTimer = player.data.GetAdditionalData().reflectionCooldown; player.data.GetAdditionalData().invert = !player.data.GetAdditionalData().invert; } } public void TriggerFracture() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) if (cooldownTimer == 0f) { soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master; SoundManager.Instance.PlayAtPosition(RSClasses.shatterSound, ((Component)player).transform, ((Component)player).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity }); GameObject shatter = Object.Instantiate(RSClasses.assets.LoadAsset("Shatter")); shatter.transform.SetPositionAndRotation(((Component)player).transform.position, ((Component)player).transform.rotation); shatter.transform.localScale = new Vector3(player.data.GetAdditionalData().fractureSize, player.data.GetAdditionalData().fractureSize, 1f); shatter.transform.rotation = new Quaternion(0f, 0f, (float)(rand.Next() % 360), (float)(rand.Next() % 360)); shatter.GetComponent().sortingLayerName = "MostFront"; ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, player.data.GetAdditionalData().fractureDuration, (Action)delegate { DestroyShatter(shatter); }); shatters.Add(shatter); } } public void DestroyShatter(GameObject shatter) { Object.Destroy((Object)(object)shatter); shatters.Remove(shatter); } private void OnDestroy() { while (shatters.Count > 0) { Object.Destroy((Object)(object)shatters[0]); shatters.Remove(shatters[0]); } } } internal class Shatter_Mono : WasDealtDamageTrigger { public ShatterEffect mono; private Player player; private void Start() { player = ((Component)this).gameObject.GetComponentInParent(); mono = ExtensionMethods.GetOrAddComponent(((Component)player).gameObject, false); } public override void WasDealtDamage(Vector2 damage, bool selfDamage) { if (player.data.currentCards.Contains(CardHolder.cards["Fracture"])) { mono.TriggerFracture(); } mono.TriggerReflect(); } private void OnDestroy() { Object.Destroy((Object)(object)mono); } } internal class Stardust_Mono : MonoBehaviour { public Player player; public float rotationDirection = 90f; private void Start() { } private void Update() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; Quaternion rotation = ((Component)this).transform.rotation; float x = ((Quaternion)(ref rotation)).eulerAngles.x; rotation = ((Component)this).transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; rotation = ((Component)this).transform.rotation; transform.rotation = Quaternion.Euler(x, y, ((Quaternion)(ref rotation)).eulerAngles.z + Time.deltaTime * rotationDirection); } private void FixedUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if (!player.data.view.IsMine) { return; } Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), 0.1f); Collider2D[] array2 = array; foreach (Collider2D val in array2) { Damagable component = ((Component)val).gameObject.GetComponent(); HealthHandler component2 = ((Component)val).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player"); if ((Object)(object)val2 == (Object)(object)player) { continue; } SoundManager.Instance.PlayAtPosition(RSClasses.stardustSound, ((Component)this).transform, ((Component)component).transform); if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent().blockedThisFrame) { PhotonNetwork.Destroy(((Component)this).gameObject); continue; } } if (Object.op_Implicit((Object)(object)component)) { Vector2 val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position); component.CallTakeDamage(((Vector2)(ref val3)).normalized * (player.data.GetAdditionalData().cometDamage / 5f), Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true); PhotonNetwork.Destroy(((Component)this).gameObject); } } } [PunRPC] public void SetValues(int ownerID, int rotation) { //IL_0048: 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) rotationDirection = rotation; player = PlayerManager.instance.players.Find((Player p) => p.playerID == ownerID); ((Component)this).GetComponent().color = player.GetTeamColors().particleEffect * 1.75f; } } public class Voidseer_Mono : MonoBehaviour { private Player player; public void Start() { player = ((Component)this).GetComponentInParent(); } public void Trigger() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((Component)player).GetComponent().CallTakeDamage(Vector2.up * 1f, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, player, true); } } }