Decompiled source of RSClasses v2.5.0
RSClasses.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using ClassesManagerReborn; using HarmonyLib; using InControl; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using Photon.Pun; 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.GameModes; using UnboundLib.Networking; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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<GameObject> Cards; public List<GameObject> HiddenCards; public static Dictionary<string, CardInfo> cards = new Dictionary<string, CardInfo>(); internal void RegisterCards() { foreach (GameObject card in Cards) { CustomCard.RegisterUnityCard(card, "RSC", card.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null); CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(card.GetComponent<CardInfo>()); cards.Add(card.GetComponent<CardInfo>().cardName, card.GetComponent<CardInfo>()); } foreach (GameObject hiddenCard in HiddenCards) { CustomCard.RegisterUnityCard(hiddenCard, "RSC", hiddenCard.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null); CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(hiddenCard.GetComponent<CardInfo>()); Cards.instance.AddHiddenCard(hiddenCard.GetComponent<CardInfo>()); cards.Add(hiddenCard.GetComponent<CardInfo>().cardName, hiddenCard.GetComponent<CardInfo>()); } } } [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", "2.4.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 = "2.4.4"; public const string ModInitials = "RSC"; internal static Harmony harmony; internal static SoundEvent reflectSound; internal static SoundEvent shatterSound; public bool pickPhase = false; 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"); assets.LoadAsset<GameObject>("CardHolder").GetComponent<CardHolder>().RegisterCards(); } private void Start() { instance = this; List<BaseUnityPlugin> list = (List<BaseUnityPlugin>)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<AudioClip>("reflect.ogg"); SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>(); val2.setting.volumeIntensityEnable = true; val2.audioClip[0] = val; reflectSound = ScriptableObject.CreateInstance<SoundEvent>(); reflectSound.soundContainerArray[0] = val2; AudioClip val3 = assets.LoadAsset<AudioClip>("shatter.ogg"); SoundContainer val4 = ScriptableObject.CreateInstance<SoundContainer>(); val4.setting.volumeIntensityEnable = true; val4.audioClip[0] = val; shatterSound = ScriptableObject.CreateInstance<SoundEvent>(); shatterSound.soundContainerArray[0] = val4; } } } 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 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; } 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; } } public static class PlayerExtension { public static readonly ConditionalWeakTable<CharacterData, PlayerAdditionalData> data = new ConditionalWeakTable<CharacterData, PlayerAdditionalData>(); 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<PlayerActions, PlayerActionsAdditionalData> data = new ConditionalWeakTable<PlayerActions, PlayerActionsAdditionalData>(); 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)40 }); } } [HarmonyPatch(typeof(GeneralInput), "Update")] internal class GeneralInputPatchUpdate { private static void Postfix(GeneralInput __instance) { try { if (((OneAxisInputControl)((Component)__instance).GetComponent<CharacterData>().playerActions.GetAdditionalData().selfHarm).WasPressed && Object.op_Implicit((Object)(object)((Component)__instance).GetComponentInChildren<Voidseer_Mono>())) { ((Component)__instance).GetComponentInChildren<Voidseer_Mono>().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<CardInfo>().rarity = RarityUtils.GetRarity(rarityNames[(int)rarity]); } } public class RSPlayerStats : MonoBehaviour { public int scythes = 0; public float scytheDamage = 1f; public float scytheSpeed = 1f; public int barriers = 0; public float barrierSpeed = 1f; public float orbitalRadius = 1f; public int comets = 0; public float cometDamage = 1f; public float cometSpeed = 1f; public float fractureDuration = 0f; public float fractureSize = 1f; public float reflectionCooldown = 1f; 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; } } [HarmonyPatch(typeof(ApplyCardStats), "ApplyStats")] public class ApplyPlayerStatsPatch { private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade) { ((Component)__instance).GetComponent<RSPlayerStats>()?.Apply(___playerToUpgrade); } } public class TabinfoInterface { public static void Setup() { StatCategory val = TabInfoManager.RegisterCategory("Astronomer Stats", 2); TabInfoManager.RegisterStat(val, "\r\rScythe Count", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().scytheCount}")); TabInfoManager.RegisterStat(val, "\r\r\rScythe Damage", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((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, "\r\rScythe Speed", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().scytheSpeed / 250f}")); TabInfoManager.RegisterStat(val, "Barrier Count", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().barrierCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().barrierCount}")); TabInfoManager.RegisterStat(val, "Barrier Speed", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().barrierCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().barrierSpeed / 100f}")); TabInfoManager.RegisterStat(val, "Orbital Size", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().barrierCount > 0 || p.data.GetAdditionalData().scytheCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().orbitalRadius}")); TabInfoManager.RegisterStat(val, "\rComet Count", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().cometCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().cometCount}")); TabInfoManager.RegisterStat(val, "\rComet Speed", (Func<Player, bool>)((Player p) => p.data.GetAdditionalData().cometCount > 0), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().cometSpeed / 2f}")); StatCategory val2 = TabInfoManager.RegisterCategory("Mirror Mage Stats", 2); TabInfoManager.RegisterStat(val2, "Reflection Replacement Cooldown", (Func<Player, bool>)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Reflection Replacement"])), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().reflectionCooldown}")); TabInfoManager.RegisterStat(val2, "Fracture Duration", (Func<Player, bool>)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Fracture"])), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().fractureDuration}")); TabInfoManager.RegisterStat(val2, "Fracture Size", (Func<Player, bool>)((Player p) => p.data.currentCards.Contains(CardHolder.cards["Fracture"])), (Func<Player, string>)((Player p) => $"{p.data.GetAdditionalData().fractureSize / 0.0225f}")); } } } namespace RSClasses.MonoBehaviors { internal class SoulScythe_Mono : MonoBehaviour { private Player player; private Scythe_Mono scythes; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); scythes = ((Component)player).GetComponent<Scythe_Mono>(); } 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<Scythe>()); } } [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<SoulScythe_Mono>(); 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<Player>(); scythes = ExtensionMethods.GetOrAddComponent<Scythe_Mono>(((Component)player).gameObject, false); barriers = ExtensionMethods.GetOrAddComponent<Barrier_Mono>(((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<Player>(); barrier = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Barrier"), ((Component)player).transform); barrier.SetActive(true); barrierCollider = ExtensionMethods.GetOrAddComponent<BarrierCollider>(((Component)barrier.transform.GetChild(0)).gameObject, false); anim = barrier.GetComponent<Animator>(); origin = barrier.GetComponentsInChildren<Transform>().Last(); SetColor(((Component)player).GetComponent<Barrier_Mono>().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<Damagable>(); HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>(); 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<Block>().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<SpriteRenderer>().color = color; barrier.GetComponentsInChildren<SpriteRenderer>().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<Player>(); ((Component)this).gameObject.transform.SetParent((Transform)null, true); } public void Update() { ((Component)this).gameObject.SetActive(!player.data.dead); } } public class Barrier_Mono : MonoBehaviour { [CompilerGenerated] private sealed class <PointStart>d__10 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public Barrier_Mono <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PointStart>d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.angle = 0.0; <>4__this.UpdateStats(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Block block; private double angle = 0.0; public Color color = new Color(1f, 1f, 63f / 85f); private List<Barrier> barriers = new List<Barrier>(); private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); block = ((Component)this).GetComponentInParent<CharacterData>().block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)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<Barrier>()); } 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().color * 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<Barrier>().SetColor(color); barrier.SetScale(player.data.GetAdditionalData().orbitalRadius * (19f / 160f)); } }); } } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); while (barriers.Count() > 0) { Object.Destroy((Object)(object)barriers[0]); barriers.Remove(barriers[0]); } } [IteratorStateMachine(typeof(<PointStart>d__10))] private IEnumerator PointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PointStart>d__10(0) { <>4__this = this, gm = gm }; } } internal class Comet : MonoBehaviour { public Vector3 velocity = new Vector3(0f, 0f, 0f); public bool active = true; private float baseScale = 1f; private float dustTimer = 0f; public Player player; public GameObject comet; private GameObject stardust; private TrailRenderer trailRenderer; private Dictionary<int, float> hitPlayers = new Dictionary<int, float>(); private Random rand = new Random(DateTime.Now.Millisecond); private void Awake() { player = ((Component)this).GetComponentInParent<Player>(); comet = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Comet"), (Transform)null); stardust = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Stardust"), (Transform)null); stardust.gameObject.SetActive(false); } private void Start() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) comet.SetActive(true); trailRenderer = comet.GetComponentsInChildren<TrailRenderer>().Last(); comet.GetComponentInChildren<SpriteRenderer>().color = player.GetTeamColors().color * 1.75f; ((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_Color"), player.GetTeamColors().color); ((Renderer)trailRenderer).material.SetColor(Shader.PropertyToID("_EmissionColor"), player.GetTeamColors().color * 1.75f); stardust.GetComponent<Stardust_Mono>().player = player; stardust.GetComponent<SpriteRenderer>().color = player.GetTeamColors().color * 1.75f; } public void DoHit() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_03b5: 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_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: 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_03ff: 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_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: 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_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) if (player.data.currentCards.Contains(CardHolder.cards["Stardust"])) { dustTimer += Time.deltaTime; while (dustTimer > 0.15f) { GameObject newDust = Object.Instantiate<GameObject>(stardust, comet.transform.position, new Quaternion(0f, 0f, (float)(rand.Next() % 360), (float)(rand.Next() % 360))); newDust.SetActive(true); newDust.GetComponent<Stardust_Mono>().rotationDirection = rand.Next(-120, 120); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 2f, (Action)delegate { Object.Destroy((Object)(object)newDust); }); dustTimer -= 0.15f; } } float num = 1f; if (player.data.currentCards.Contains(CardHolder.cards["Stellar Impact"])) { Mathf.Clamp((((Vector3)(ref velocity)).magnitude / 5f - 1f) * player.data.GetAdditionalData().cometSpeed, 1f, 1.5f * player.data.GetAdditionalData().cometSpeed); } if (!player.data.view.IsMine) { return; } 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 num2 = ((Component)this).transform.lossyScale.y * 0.9f; Collider2D[] array3 = Physics2D.OverlapCircleAll(Vector2.op_Implicit(comet.transform.position), num2); Collider2D[] array4 = array3; foreach (Collider2D val in array4) { Damagable component = ((Component)val).gameObject.GetComponent<Damagable>(); HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>(); 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(comet.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<Block>().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_00af: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_01b8: 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_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = playerPos - comet.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Distance(comet.transform.position, playerPos) / 2f; float num2 = baseScale; if (player.data.currentCards.Contains(CardHolder.cards["Icemelt"])) { num2 *= (((double)num < 7.5) ? (0f - num / 7.5f + 2f) : 1f); } trailRenderer.widthMultiplier = num2; comet.transform.localScale = new Vector3(num2, num2, num2); float num3 = 100f / num; velocity *= (float)Math.Pow(0.949999988079071, Time.deltaTime); velocity += new Vector3(normalized.x * num3, normalized.y * num3) * Time.deltaTime; if (((Vector3)(ref velocity)).magnitude > 15f) { velocity *= 15f / ((Vector3)(ref velocity)).magnitude; } Transform transform = comet.transform; transform.position += velocity * Time.deltaTime * player.data.GetAdditionalData().cometSpeed; 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); comet.transform.rotation = rotation; } public void SetScale(float scale) { baseScale = scale; } private void OnDestroy() { Object.Destroy((Object)(object)comet); } public void Update() { ((Component)this).gameObject.SetActive(!player.data.dead); } } public class Comet_Mono : MonoBehaviour { [CompilerGenerated] private sealed class <BattleStart>d__9 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public Comet_Mono <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <BattleStart>d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.active = true; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <PickEnd>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public Comet_Mono <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PickEnd>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.UpdateStats(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <PointEnd>d__10 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public Comet_Mono <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PointEnd>d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.active = false; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <PointStart>d__8 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public Comet_Mono <>4__this; private int <index>5__1; private List<Comet>.Enumerator <>s__2; private Comet <comet>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PointStart>d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <comet>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) if (<>1__state != 0) { return false; } <>1__state = -1; <index>5__1 = 0; <>s__2 = <>4__this.comets.GetEnumerator(); try { while (<>s__2.MoveNext()) { <comet>5__3 = <>s__2.Current; <comet>5__3.comet.transform.position = ((Component)<>4__this.player).transform.position + new Vector3(0f, 7.5f - (float)(15 * <index>5__1), 0f); <comet>5__3.velocity = new Vector3(0f, 0f, 0f); <index>5__1++; <comet>5__3 = null; } } finally { ((IDisposable)<>s__2).Dispose(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private bool active = false; private List<Comet> comets = new List<Comet>(); private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); GameModeManager.AddHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart); GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); } 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); comet.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 while (comets.Count() < player.data.GetAdditionalData().cometCount) { GameObject val = new GameObject("Comet", new Type[1] { typeof(Comet) }); val.transform.SetParent(((Component)player).transform); comets.Add(val.GetComponent<Comet>()); val.GetComponent<Comet>().player = player; } while (comets.Count() > Math.Max(player.data.GetAdditionalData().cometCount, 0)) { Object.Destroy((Object)(object)comets[0]); comets.Remove(comets[0]); } foreach (Comet comet in comets) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate { comet.SetScale(player.data.GetAdditionalData().orbitalRadius * 0.5f + 0.5f); }); } } private void OnDestroy() { GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd); GameModeManager.RemoveHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart); GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart); GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd); while (comets.Count() > 0) { Object.Destroy((Object)(object)comets[0]); comets.Remove(comets[0]); } } [IteratorStateMachine(typeof(<PickEnd>d__7))] private IEnumerator PickEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PickEnd>d__7(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(<PointStart>d__8))] private IEnumerator PointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PointStart>d__8(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(<BattleStart>d__9))] private IEnumerator BattleStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <BattleStart>d__9(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(<PointEnd>d__10))] private IEnumerator PointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PointEnd>d__10(0) { <>4__this = this, gm = gm }; } } public class ForcedReflection_Mono : MonoBehaviour { private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); Gun gun = player.data.weaponHandler.gun; gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(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<GameObject>(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<Player>(); 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<PlayerCollision>().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<Player>(); Gun gun = player.data.weaponHandler.gun; gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(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<ForcedRefractionEffect>(); 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<Player>(); 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<PlayerCollision>().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 = 10f; private float timer = 0f; private float scaleFactor = 3f; private void Awake() { player = ((Component)this).GetComponentInParent<Player>(); attackLevel = ((Component)this).GetComponent<AttackLevel>(); timerVisualizer = ((Component)this).transform.GetChild(1); } private void FixedUpdate() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = new Vector3(player.data.GetAdditionalData().orbitalRadius * scaleFactor, player.data.GetAdditionalData().orbitalRadius * scaleFactor); timer += Time.deltaTime; 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<HealthHandler>(); if (Object.op_Implicit((Object)(object)component)) { Player component2 = ((Component)component).GetComponent<Player>(); 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<HealthHandler>(); component.Heal(healAmount); } } public class KaleidoParty_Mono : MonoBehaviour { private Player player; private Gun gun; public void Start() { player = ((Component)this).GetComponentInParent<Player>(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(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<RayHitReflect>(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<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(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<Player>(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); if ((Object)(object)savedGuns[0] == (Object)null) { savedGuns[0] = new GameObject("Mirror Gun").AddComponent<SimulatedGun>(); } if ((Object)(object)savedGuns[1] == (Object)null) { savedGuns[1] = new GameObject("Sapphire Gun").AddComponent<SimulatedGun>(); } if ((Object)(object)savedGuns[2] == (Object)null) { savedGuns[2] = new GameObject("Ruby Gun").AddComponent<SimulatedGun>(); } if ((Object)(object)savedGuns[3] == (Object)null) { savedGuns[3] = new GameObject("Emerald Gun").AddComponent<SimulatedGun>(); } foreach (Player item in PlayerManager.instance.players.Where((Player p) => p.playerID != player.playerID)) { ExtensionMethods.GetOrAddComponent<MirrorMageVisualizer_Mono>(((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<StopRecursion>().Length != 0) { return; } SimulatedGun val = savedGuns[0]; val.CopyGunStatsExceptActions(gun); val.CopyAttackAction(gun); val.CopyShootProjectileAction(gun); ((Gun)val).ShootPojectileAction = (Action<GameObject>)Delegate.Remove(((Gun)val).ShootPojectileAction, new Action<GameObject>(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<GameObject>)Delegate.Remove(((Gun)val2).ShootPojectileAction, new Action<GameObject>(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<GameObject>)Delegate.Remove(((Gun)val3).ShootPojectileAction, new Action<GameObject>(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<GameObject>)Delegate.Remove(((Gun)val4).ShootPojectileAction, new Action<GameObject>(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<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectileAction)); Object.Destroy((Object)(object)savedGuns[0]); Object.Destroy((Object)(object)savedGuns[1]); Object.Destroy((Object)(object)savedGuns[2]); Object.Destroy((Object)(object)savedGuns[3]); Object.Destroy((Object)(object)savedGuns[4]); Object.Destroy((Object)(object)savedGuns[5]); Object.Destroy((Object)(object)savedGuns[6]); } } internal class MirrorMageVisualizer_Mono : MonoBehaviour { private Dictionary<int, List<GameObject>> reflections = new Dictionary<int, List<GameObject>>(); private Player player; public void Awake() { player = ((Component)this).GetComponentInParent<Player>(); } 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<GameObject> list = new List<GameObject>(); GameObject val = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Reflection"), ((Component)item).transform); val.transform.SetPositionAndRotation(new Vector3(1000f, 1000f, 1000f), ((Component)item).transform.rotation); val.SetActive(true); val.GetComponent<SpriteRenderer>().color = item.GetTeamColors().color; list.Add(val); for (int i = 0; i < 6; i++) { list.Add(Object.Instantiate<GameObject>(val, ((Component)item).transform)); } reflections[item.playerID] = list; } for (int j = 0; j < 7; j++) { reflections[item.playerID][j].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<int, List<GameObject>> 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<LineRenderer>(mirror, false); orAddComponent.startWidth = 0.25f; orAddComponent.endWidth = 0.25f; ((Renderer)orAddComponent).material = RSClasses.assets.LoadAsset<Material>("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<LineRenderer>(prism, false); orAddComponent2.startWidth = 0.25f; orAddComponent2.endWidth = 0.25f; ((Renderer)orAddComponent2).material = RSClasses.assets.LoadAsset<Material>("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<LineRenderer>(kaleido1, false); orAddComponent3.startWidth = 0.25f; orAddComponent3.endWidth = 0.25f; ((Renderer)orAddComponent3).material = RSClasses.assets.LoadAsset<Material>("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<LineRenderer>(kaleido2, false); orAddComponent4.startWidth = 0.25f; orAddComponent4.endWidth = 0.25f; ((Renderer)orAddComponent4).material = RSClasses.assets.LoadAsset<Material>("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<int, List<GameObject>> reflections = new Dictionary<int, List<GameObject>>(); private Player player; public void Awake() { player = ((Component)this).GetComponentInParent<Player>(); } 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<GameObject> list = new List<GameObject>(); GameObject val = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Reflection"), ((Component)item).transform); val.transform.SetPositionAndRotation(new Vector3(1000f, 1000f, 1000f), ((Component)item).transform.rotation); val.SetActive(true); val.GetComponent<SpriteRenderer>().color = item.GetTeamColors().color; list.Add(val); list.Add(Object.Instantiate<GameObject>(val, ((Component)item).transform)); list.Add(Object.Instantiate<GameObject>(val, ((Component)item).transform)); list.Add(Object.Instantiate<GameObject>(val, ((Component)item).transform)); list.Add(Object.Instantiate<GameObject>(val, ((Component)item).transform)); list.Add(Object.Instantiate<GameObject>(val, ((Component)item).transform)); list.Add(Object.Instantiate<GameObject>(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<int, List<GameObject>> 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; 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<Player>(); scythe = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Scythe"), ((Component)player).transform); scythe.SetActive(true); SetColor(((Component)player).GetComponent<Scythe_Mono>().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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) 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<Damagable>(); HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>(); float num = 0f; if (player.data.currentCards.Contains(CardHolder.cards["Dark Harvest"])) { num = player.data.stats.lifeSteal * 50f; } float num2 = player.data.GetAdditionalData().scytheDamage + num; Vector2 val3; if (Object.op_Implicit((Object)(object)component2)) { Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player"); SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform); val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(scythe.transform.position); component2.CallTakeForce(((Vector2)(ref val3)).normalized * 2500f, (ForceMode2D)1, true, false, 0f); ableToHit = false; if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame) { continue; } if (player.data.currentCards.Contains(CardHolder.cards["Death's Blade"])) { num2 = Math.Max(val2.data.maxHealth * 0.15f, num2); } } 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 * 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); ((Qua